jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy T. Fielding <field...@gbiv.com>
Subject Re: UUIDs, URIs, handles and so forth
Date Mon, 11 Apr 2005 21:46:48 GMT
On Apr 10, 2005, at 7:45 AM, Stefano Mazzocchi wrote:
>>> So, my question is: is it possible to specify the node UUID 
>>> externally? (as long as local unicity is guaranteed, obviously)
>> Not really, since fast implementations will depend on it being a
>> fixed-length number (internally) rather than a string.
> Oh, c'mon, that's totally bogus: do a hash on the ID if you need a fix 
> number.

UUIDs are (generally) fixed numbers that have been carefully crafted
to be either locally unique (domain+timestamp) or probably unique
(random string of enough bits to make collisions unlikely).  Most
generators are written such that local duplication is essentially
impossible for a decade or so, but the only way that can be assured
is if only one generator is allowed.  In any case, the only
advantage UUIDs have over dated URIs is the binary encoding.

> Are they at least locally unique over time? I mean, if I had a URI like
>  http://your.domain/uuid/[UUID]
> would that be unique? I'm asking because I'm thinking of ways to 
> encode the 'system' view of the JCR tree into RDF and I need to make 
> sure that I have a way to refer to each and every node in a sound way.

It really depends on how the UUID is generated and which of the
(four or eight, can't remember) bit formats was chosen.  One of
those actually embeds the domain with the UUID.  Actually, if
you own the only name generator for your.domain, then any URI
plus a timestamp would be sufficient.


View raw message