[ZODB-Dev] Reachability and GUI apps

Thomas Guettler hv at tbz-pariv.de
Fri Jul 2 06:33:41 EDT 2004


Am Mittwoch, 30. Juni 2004 21:18 schrieb Rad Widmer:
> Is my understanding of reachability correct? Has anyone had a similar
> situation, and how have you handled it? One approach I can think of would
> be to switch to a mediator-type of Publish/Subscribe pattern (such as the
> pubsub module in wxPython), where a single pubsub object is used to hold
> all references to observers, and to which objects post when an update
> occurs. With this approach, I wouldn't need to have a reference to the
> pubsub object in my domain classes (it could be some kind of global
> reference).

I had a similar problem some time ago. I want to count the number
of commits. Storing this information in the persistent object 
results in write conflicts if serveral processes (ZEO) increment
the counter. I need the counter only for one process.

First I tried volatile attributes. But they can disappear after
a commit. Now I pass a non persistent counter object to
the methods. You could store this information at module level,
too.

HTH,
 Thomas



More information about the ZODB-Dev mailing list