[Zope-CMF] Re: cmfuid

Gregoire Weber gregweb at gmx.ch
Sun Nov 21 14:08:00 EST 2004


Hi Chris,

>No, I'm worried about generating actual unique ids without read
>conflicts causing the request to be retried.  (FWIW, there are no BTrees
>around in CMFUid, just a Length object.)
> 
>> That is a different problem.  The approach should probably do something 
>> like the RID-generation stuff in the catalog, which doesn't rely on 
>> write conflicts to avoid collisions.
>
>Yup it is a different problem.

When I did that it seemed to me to be the simplest method to use a counter.
Using BTrees.Length was then the best decission. BTrees.Length do write 
conflict management.

As I'm not so deep into ZODB I can't say anything about read conflicts.

My advice is to just replace 'portal_uidgenerator' with your own UID 
or UUID generator implementation.

By the way: It would be cool if someone could implement <http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-03.txt> (hint, hint!). Actually I think this should be a python lib ...

Gregoire



More information about the Zope-CMF mailing list