[ZODB-Dev] Quick ZODB connection synch question

Christian Reis kiko at async.com.br
Mon Sep 29 10:12:29 EDT 2003


On Mon, Sep 29, 2003 at 10:01:14AM -0400, Shane Hathaway wrote:
> Now, Zope uses a little trick that avoids the need to calling sync(): it 
> opens a database connection for every HTTP request.  The only pitfall of 
> this trick is that if you don't also run an asyncore loop with ZEO, the 
> database will not receive ZEO invalidations.  You'll only fall into this 
> if you're using ZEO, you're not using sync(), and you're not using an 
> asyncore loop.

The other upside of opening a database connection for every request is
that each connection (and therefore transaction) is short-lived, so you
have less opportunity to read in stale data and generate write
conflicts.

However, I think Nic (as I) was actually interested in finding out how
to run a ZEO setup that doesn't use an asyncore loop :-)

Take care,
--
Christian Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



More information about the ZODB-Dev mailing list