[ZODB-Dev] Invalidations

Jim Fulton jim at zope.com
Wed Apr 27 06:10:15 EDT 2005


Tim Peters wrote:
> [Rajeev J Sebastian]
> 
>>Is there some means provided by ZODB/Zeo by which I can get notified
>>about changes to certain objects after performing sync() ?
> 
> 
> There is not.  Object state is loaded by calling its __setstate__() method,
> and you may be able to hack something out of that, but you would need a good
> understanding of the implementation to do more good than harm playing at
> that level.

But such a feature could be really nice to have.

> 
>>Also, is it possible to have sync() run automatically (ie, without me
>>calling it after a timeout) ?

We should probably think harder about the semantics of sync. But
it implied a transaction boundary -- specifically, an abort.
You wouldn't want this to happen automatically.

> ZEO is intended to be run with an asyncore mainloop running too.  There was
> a thread about that here just last week, starting here:
> 
>     http://mail.zope.org/pipermail/zodb-dev/2005-April/008722.html

We can do a lot better though, especially now that we have the
ISynchronizer API.  I would argue that a conection that gets an
afterCompletion call should call sync on it's storage.  This would
have avoided the problem cited above I think.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list