[Zope-CMF] Re: CMFUid isn't generating real uids

Jean-Marc Orliaguet jmo at ita.chalmers.se
Mon Aug 16 05:28:50 EDT 2004


robert rottermann wrote:

>
>
> yuppie wrote:
>
>> Hi!
>>
>>
>> Christian Heimes wrote:
>>
>>> 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.
>>
>>
>>
>> Hope you've recovered from your shock!
>>
>>
>> UID != UUID
>>
>> The way UIDs are generated is policy. Generating UUIDs would be 
>> overkill for the use cases implemented in CMFDefault. If you want to 
>> expose the UID to users, 128-bit UUIDs aren't very useful.
>
>
Hi!

> Genertaing an UIID costs nearly nothing

but it costs a lot to keep them unique, how do you enforce a policy 
between sites?

> And why should any UID or UUID ever be presented to the user?
>
they appear in URLs, in Plone's navigation tree,  - this is what you see 
for instance when you create a document before it gets a title, since 
Plone invokes the factory before having all the necessary information 
about the document and complains afterwards that the title is missing 
(which is basically putting the cart before the horse), so the left 
column momentarily covers 50% of the screen until you input a title, and 
if you don't input a title you will have created an orphaned document 
with a 128 bit long id lying around... this is then the only way you 
have to identify the document.

> I think UUID should be default. If it is overkill in a given case, 
> then it should be replaced.
> But I never want to run the risk to hit duplicate UID's when I import 
> some documents from one Data.fs into an other.
> UID's are just to restricted to be worthwile.

as soon as you import documents as they are from another place  (through 
Data.fs, .zexp, ...), they from then on reside in at least two places, 
and the UUIDs are no longer universal, are they?

regards /JM

> Robert
>



More information about the Zope-CMF mailing list