← Back to team overview

u1db-discuss team mailing list archive

Re: A DB of my own

 

On Tue, 2011-11-29 at 09:12 -0500, Rodney Dawes wrote:
> On Tue, 2011-11-29 at 09:52 +0000, Stuart Langridge wrote:
> > So... do we have a sync daemon and support multiple apps? Or do we avoid
> > this problem by not dealing with it, at the expense of making every app
> > developer handle authentication and syncing themselves?
> 
> The way I see it, developers are going to have to handle auth and
> syncing themselves anyway, to sync with anything that isn't U1. It's
> probably just better to make the API simple and extensible enough, to
> make that easier, rather than trying to make some other solution outside
> of the API, which doesn't necessarily make any of it easier, and makes
> other problems more difficult.
> 
> Having a separate daemon doing the sync with U1 means we have yet
> another thing that can break, and which requires more extensive
> documentation, on top of documentation we have to provide anyway. Having
> a nice API to do the sync and auth pieces seems like less work than
> having a daemon for sync, and would make it easier for app developers to
> sync their data, and wouldn't require us to write and maintain another
> daemon, which has to run all the time, and deal with lots of databases.
> 
> Also, the daemon solution presumably only will work on Windows, OSX, and
> Ubuntu, and not on Android, iOS, in-browser, etc… so it seems like an
> odd path to take, if it doesn't fit all those models as nicely as a
> simple and nice API would, which people will have to use on other
> platforms anyway.

I basically agree here with all of this, I think. Having a "sync daemon"
doesn't apply on many platforms, it means that apps have to be much more
vigilant about whether the data has changed without them noticing, and
it's an extra daemon which has to be running all the time and so on.
After various discussions, I think I'm less convinced by the idea that
it's necessary, and more convinced that apps should deal with syncing
themselves, possibly with some useful utility libraries to handle the
get-a-u1-auth-token stuff which could be part of a u1db implementation
on a given platform. So, no sync daemon, barring compelling new
arguments.

sil




Follow ups

References