[ZODB-Dev] Quick ZODB connection synch question

Nicholas Henke henken at seas.upenn.edu
Fri Sep 26 20:15:28 EDT 2003


On Fri, 2003-09-26 at 15:17, Jeremy Hylton wrote:
> On Fri, 2003-09-26 at 15:05, John Belmonte wrote:
> > Dieter Maurer wrote:
> > > The ZODB processes invalidation requests for a connection only
> > > 
> > >   *  when the connection is opened
> > >   
> > >   *  when you commit or abort a transaction *AND* this transaction
> > >      has at least one object modified from this connection (such
> > >      that the connection is registered with the transaction)
> > > 
> > >   *  you call "connection.sync".
> > 
> > But the docs mention something about an asyncore main loop.  How does 
> > that fit in?
> 
> It has to do with invalidations sent by the ZEO server.   If you have an
> asyncore mainloop running, invalidations will be handled automatically
> as they are received.  If you app doesn't have a mainloop, then it won't
> read those invalidations unless you explicitly call sync to read data
> from the network; the invalidations will just pile up in the socket
> buffer waiting for the app to read them.

You know, I have heard this several times, but I still have yet to see a
simple example for a non zope application. Is there a possibility one of
y'all could 'show us the light' for a seemingly important ( and frankly
much hidden ) issue ? I have done it, but am never sure it is done
right.

Thanks!
Nic
-- 
Nicholas Henke
Penguin Herder & Linux Cluster System Programmer
Liniac Project - Univ. of Pennsylvania





More information about the ZODB-Dev mailing list