[Catalyst] Confirmations numbers for Humans

Simon Elliott simon at browsing.co.uk
Thu Mar 2 17:09:38 CET 2006


I expect its produced by a count() of completed bookings (or a  
separate value which increments on completion this for speed),  
perhaps the two leading digits are randomly generated for security,  
though I expect not.

Simon.

On 2 Mar 2006, at 15:34, Christopher H. Laco wrote:

> Bill Moseley wrote:
>> 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.
>
> Somewhat related to your question...this may be of help..
>
> http://search.cpan.org/~mwx/Data-Uniqid-0.11/Uniqid.pm
>
> Data::Uniqid provides three simple routines for generating unique ids.
> These ids are coded with a Base62 systen to make them short and handy
> (e.g. to use it as part of a URL).
>
>   suinqid
>     genrates a very short id valid only for the localhost and with a
>     liftime of 1 day
>
>   uniqid
>     generates a short id valid on the local host
>
>   luniqid
>     generates a long id valid everywhere and ever
>
>
>
> -=Chris
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst




More information about the Catalyst mailing list