[dev] [commits] Horde branch master updated. c1f241be16aa88a278d0e51fc7baa78e39008cca
Michael M Slusarz
slusarz at horde.org
Thu Aug 19 20:21:26 UTC 2010
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Chuck Hagenbuch <chuck at horde.org>:
>>
>>> Any reason this isn't just an option when creating uuids?
>>
>> UUID's (Universally Unique Identifier -
>> http://en.wikipedia.org/wiki/Uuid) are a specific, standardized
>> string. Having that class produce anything else destroys its
>> purpose (I'm assuming this is the same reason why
>> Horde_Support_Guid:: exists).
>
> Right, but there are binary UUIDs at least; what does Randomid offer
> aside from a packed format that Uuid doesn't?
One issue with UUIDs is that, in many instances, we are lugging around
duplicative data bytes. Since certain portions of the UUID will
remain constant for *every* UUID generated on that device (e.g. the
SERVER_ADDR part), this is just superfluous information that increases
the size of the ID without increasing the randomness.
(As an aside, SERVER_ADDR is probably not the best value to be using
anyway, since there will be many collisions of SERVER_ADDR, especially
for servers located behind firewalls - 192.168.x.x, etc.)
Randomids are a more compact representation of data in instances where
we don't need a globally unique ID - we simply need an ID unique to
the current item. Examples: IDs in a database, cache busting strings.
These are examples where UUIDs are overkill.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list