[wp-hackers] Time to change GUID to UUID?
Lynne Pope
lynne.pope at gmail.com
Mon May 9 00:18:08 UTC 2011
On Mon, May 9, 2011 at 2:38 AM, Eric Mann <eric at eam.me> wrote:
> Lynn, using your example the only real way to guarantee global uniqueness
> for the GUIDs would be to use some kind of external service that keeps
> track. I say this, because even hashes can (theoretically) repeat for
> different content.
>
> Some suggestions I've seen for making GUIDs into real GUIDs (in this thread
> and in the past:
>
> - Use the UUID feature of MySQL
> - Hash the URL of the post
> - Hash the URL of the post with a hash of the content
> - Hash the URL of the post with the site name as a salt
>
> In isolation, none of these can be guaranteed as unique against other
> sites.
> If we were to use one of any of them, we'd still potentially run into your
> problem of person B taking over an abandoned site and ending up with a GUID
> that duplicates a value used by the previous site owner. True, it'd be a
> rare case, but a real possibility.
The example I gave is what happens now. Basing the GUID on the domain name
is far from unique.
Creating a string from a salted URI + timestamp + cryptographic quality
highly-random number is far more likely to give practical uniqueness. UUID's
can never be absolutely unique across all of time and space but they can get
pretty close.
Lynne
More information about the wp-hackers
mailing list