[ZODB-Dev] Commit or lock object accross transactions

Roché Compaan roche at upfrontsystems.co.za
Thu Jul 17 09:22:36 EDT 2003


* Steve Alexander <steve at cat-box.net> [2003-07-16 21:40]:
> >Generating a unique and sequential ID over a global space is not a very
> >trivial matter, and I'm not sure all of it is the ZODB's fault in this
> >case.  There are a number of potential constraints that should to be
> >considered. The ones I work with in my app are:
> >
> >    - The ID should be globally unique.
> >    - The transaction using an allocated ID may be cancelled after it
> >      is allocated.
> >    - The ID should be presentable to the end-user in the UI before the
> >      transaction is commited.
> >
> >  - Scenario 1: Locking primitive.
> 
> >  - Scenario 2: Lazy consistency. 
> 
> 
> What about running a server that serves up unique seqential IDs by 
> throwing UDP packets around? That way, you can keep locking issues 
> outside of the ZODB, and make the same sequence easily available to any 
> number of ZEO clients.

But you will still have orphaned ids, unless clients tell the object
counter that it didn't use an id and one maintains a list of orphaned
ids available for re-use.

-- 
Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za



More information about the ZODB-Dev mailing list