← Back to team overview

u1db-discuss team mailing list archive

Re: A DB of my own

 

On Thu, 2011-12-01 at 18:52 -0500, James Westby wrote:
> On Tue, 29 Nov 2011 09:52:50 +0000, Stuart Langridge <stuart.langridge@xxxxxxxxxxxxx> wrote:
> > It is difficult to think of a good way of handling this without either
> > apps polling whats_changed in a background thread or implementations
> > providing some sort of async the-database-has-changed signal. However,
> > async stuff is very implementation-specific, which makes it hard to
> > document this approach, and the Python reference implementation won't
> > contain it (because it is all sync and does not require a mainloop).
> 
> It seems like something that could be an "optional extra" though. Those
> places where it makes sense can implement it, and there can be
> guidelines on doing that. Places that can't have the basic sync API.
> 
> Anyone who is doing GUI work is likely to end up layering threads and
> signals/deferreds/callbacks/whatever on top of a sync API anyway.

Agreed. However, it's difficult to talk about best-practices for using
U1DB if those best-practices are implementation-specific.

sil




References