[ZODB-Dev] List of modified objects

Tim Peters tim at zope.com
Mon Dec 6 15:30:07 EST 2004


[Kapil Thangavelu]
> fwiw,
>
> i put together a transaction observer api for zodb < 3.3
>
> viewcvs
>
> http://svn.objectrealms.net/view/public/transactionobserver/trunk/
>
> checkout
>
> svn co https://svn.objectrealms.net/svn/public/transactionobserver/trunk

Yup, I'm aware of that.  No time to study it, just aware of it <wink>.

> for zodb3.3, it would be nice if an optional observable or introspectable
> interface could be on connections, for this sort of functionality to be
> duplicated.

ZODB 3.3 is history.  If people want something new in ZODB 3.4, it needs
careful definition first.  "An optional observable or introspectable
interface" is too vague.  If I have time (which is unlikely), I'd like to
build something on Zope3's event system.  Objects can publish events, and
objects can subscribe to events.  I'm sure someone would have a snit if I
said that was another way to spell "observable", so I won't.  Luckily, the
description at this level is also too vague to argue about <wink>.

The kind of monkey-patching you did for ZODB < 3.3 looks harder in 3.3, for
several reasons (for starters, transactions in 3.3 don't deal with
Connections, they deal with "resource managers", resource managers may or
may not keep track of their own modified objects (Connections do; for those
that don't, there are adapter layers that do it for them), and nothing is
defined exposing resource manager internals).

If forensic.py is the only actual use case, then an API to iterate over the
modified objects again looks sufficient, in conjunction with 3.3's
beforeCompletion() hooks.  Nothing uses beforeCompletion() now.  I note that
it doesn't distinguish between commit() and abort(); it probably should.



More information about the ZODB-Dev mailing list