[Zope-ZEO] Does the ZODB support ACID?

Ender kthangavelu@earthlink.net
Sat, 11 Nov 2000 05:37:24 -0800


"A.M. Kuchling" wrote:
> 
> Is it technically correct to say that the ZODB supports the ACID
> properties?  Atomicity is clearly supported, as is Durability.

my two cents, please find salt:)

> I'm less sure of Isolation; does the ZODB guarantee that changes are
> isolated between two different transactions?  I'm wondering if it's
> possible for clever code to subvert isolation in this scenario:
> 
> * Program A accesses an object O.
> * A then flushes its ZODB cache.
> * Program B modifies O and commits the transaction.
> * A, running in the same transaction as before, accesses O and sees its
>   value as modified by B.  This breaks isolation.

i'm not totally sure if the zodb supports this, i 'think' it does in a
limited sense that doesn't enforce isolation as given above, more it
seems an optimistic approach to avoiding concurrent changes to the same
object in different transactions. at least this is the behavior that
seems to generate conflict errors.  the above behavior is supportable
via some sort of transaction manipulation. ie timestamp the transaction
beginining, and you could do isolation handling code whenever you pick
up an object (into the transaction) thats
bobo_modification_date/timestamp was after the transaction time stamp,
what the correct behavior is debatable depending on what kind of
isolation you want to achieve.

btw the postgres developers put up some really good material from the
open source db summit thats available at (specific to this discussion
the transactions paper and tour), the link

http://www.postgresql.org/osdn/index.html

> And finally, I don't really see how the ZODB supports Consistency,
> since there's no mechanism for specifying integrity constraints within
> ZODB itself, though you can certainly write such checks into your
> classes.  For example, you can't enforce that the .actor attribute is
> a User object that must be present in a given list.
>

since the zodb tries to act as transparently as possible as an object
store and consistency checks will need to be application enforced. the
only real zodb consitency check is pickability and reachability from the
root node. 

btw. i've been trying to work on a transactions paper for the last month
or so in some of my limited spare time, i'm pretty sure at this point
that i'm not going to be getting it done anytime soon, so i'd like to
open up the work done so far to community input. i'll try and get the
last vestiges of my work on it done this weekend and throw it up on a
public wiki on zope.org, if anyone wants to review it and give some
feedback prior to this, the document is publicly available at

http://sindev.dyndns.org/Projects/Transaction_Paper/

Thanks 


Kapil Thangavlu