[Q]:Generate Unique ID's
Mel Wilson
mwilson at the-wire.com
Sun May 25 10:45:05 EDT 2003
In article <3ED0298A.872CB221 at alcyone.com>,
Erik Max Francis <max at alcyone.com> wrote:
>achrist at easystreet.com wrote:
>
>> A trillion is only about 2 ^ 40. Because of the sqrt, you only get
>> about one collision in 2^(2*(64 - 40)) databases.
>> [ ... ] Is one key collision every 100
>> million years "close enough" to "never" for "practical purposes"?
>
>It's a good question, and it's something you should ask yourself. If a
>key collision would be absolutely devastating (i.e., your application
>would die horrible and stop working from that point on), then calculate
>the average lifetime you expect your program to have and estimate the
>probability of a collision during that time.
>
>Then, it's a matter of drawing a line in the sand.
If economic development in China and India goes the way
they'd like there could be 2**34 systems cranking out GUIDs
for whatever GUIDs will be used for real soon now.
But a truly General Universal ID is a really tall order.
With many IDs, when you consider their expected lifetime and
the number of other IDs they'll encounter in that time, a
largish random ID will be fine. An ID might apply to a
message in The World Net for only a day or so, or it might
identify a row in some one specific database for a long
time, but still not need to be G. and U.
Regards. Mel.
More information about the Python-list
mailing list