[Zope-CMF] CMFUid isn't generating real uids
Christian Heimes
heimes at faho.rwth-aachen.de
Sat Aug 14 11:34:51 EDT 2004
Hello everybody!
I had a short look at CMFUid because I hoped we could replace the AT uid
generator and lookup tool with a more general tool that's also working
with non Archtypes types. I was disapointed to shocked as I saw how the
uids are generated.
It's just an incremental counter which is more likely a very simplistic
id generator but not a real uid generator. It's not likely that other
portals are using the same uid, it's a FACT because every portal is
starting the with id 0. IMO that's not unique.
In Archetypes we are also including informations about the machine in
the uid to create uuid (universal unique ids). The uuid is created from
the local host name, a time stamp, a random value and from abitrary
arguments and the output of md5.md5(data).hexdigest() is used as uid.
This makes it mathematical nearly impossible to have one uid twice over
all cmf based sites on earth.
A good uid should follow these rules (from the manual of uuidgen)
DESCRIPTION
The uuidgen program creates a new universally unique
identifier (UUID)
using the libuuid(3) library. The new UUID can reasonably be
considered
unique among all UUIDs created on the local system, and among
UUIDs created
on other systems in the past and in the future
Christian
More information about the Zope-CMF
mailing list