[ZODB-Dev] ZODB4 project plan

Christian Reis kiko@async.com.br
Fri, 29 Nov 2002 17:28:33 -0200


On Fri, Nov 29, 2002 at 12:41:37PM -0500, Shane Hathaway wrote:
> > Wow, this is exactly what I want. I need to keep different "views" of my
> > application objects, one per window (but inside a single thread), and to
> > be able to check that set in to the persistence mechanism (or not).
> > Right now I do it in a very dumb way (using the new module, and making a
> > copy of the object's state -- yes, this breaks if we change a foreign
> > object and want to roll that back) but I would die to have an easy way
> > to do that. I've even pondered using threads for this, but I would
> > rather use the GUI main loop as it should be.
> 
> I wonder if in your case you really want a separate database connection 
> per window.  Wouldn't that do exactly what you want?  Would it break 
> anything?  (Set aside for a moment the issue of possibly consuming 
> excessive RAM when many windows are open.)

Yes, I want a separate connection per window, and it would do exactly
what I want *IF* transactions were tied to connections, and not to the
threads. kapil posted his FreeTxn.py code a while back, and I've tested
it as far as it seems to work, but my message about it to the list has
gone unanswered:

    http://lists.zope.org/pipermail/zodb-dev/2002-November/003731.html

> You would also want to decouple transactions from threads, which isn't 
> very hard, especially since there's now a Connection.register() method 
> which you can override to choose the correct transaction.  I won't 
> ramble on about this unless you tell me I'm on the right track, though. :-)

Can we do this today easily in ZODB3? 

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL