[Catalyst] Confirmations numbers for Humans

Bill Moseley moseley at hank.org
Thu Mar 2 16:31:07 CET 2006


I'm curious about those short airline confirmation ids.
My last airline confirmation number was BU8743, which is a lot easier
to say over the phone than, say, a UUID or md5 hash.  But, their
unique-ness is, well, less unique.  I assume those confirmation
numbers are only valid for some defined period of time.

Is anyone generating short ids like those airline confirmation
numbers?

How are you generating them and what actions do you use to
keep them unique?  What's your system for deciding when to purge old
ids and how to recycle them?  If you do purge them, do you have a
separate way to lookup a transaction after they are purged?

I suppose to create them I could truncate a MD5 hash and then test the
database to see if it exists (using a serializable transaction
isolation level).  I've used other metheds such as creating a random
hex number and appending a day number sequence.



-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list