Guid's

Linas Vepstas linas@linas.org
Wed, 25 Jul 2001 18:59:42 -0500


On Thu, Jul 26, 2001 at 07:31:53AM +1200, Rob Brown-Bayliss was heard to remark:
> 
> Hi, I was reading the docs some where about the guid's that gnucash
> uses.  And it states something like a GUID will be unique in a single
> site setup, and quite probably in the world.  

Scratch that. Probably unique in the entire universe.

2^128 = 10^38

The are far far fewer stars in the universe.

> How probable is it?  Obviously the possibility of duplicates increases
> with each additional site included etc...  but I am interested in this.

If you could generate uuids at the rate of a trillion a second (you'd need
a bank of about 10,000 present day computers to get to that rate), and you
let it run for 10 years, you would have only generated less than femtillionth
of a percent of the total available (nano..pico..femto)

If you ran these computers for the entire age of the universe (about
12 billion years) you'd have generated nearly one-millionth of one-percent
of the total.  That is, if you ran em that long, you'd have a slightly
better chance than one in a billion for coming up with a duplicate.

Food for thought. Of course, no programmer can ever be paranoid enough ...

> Thanks, and perhapse this is not the right list for it?

Sure it is.  
BTW, Gnucash has a commandline utility for generating guid's, I'm not sure
why it was needed, as most unixes have the command-line utility 'uuidgen'
which does the same thing. 

--linas


> 
> --
> 
>   Rob Brown-Bayliss
>  ---======o======---
> _______________________________________________
> gnucash-user mailing list
> gnucash-user@lists.gnumatic.com
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-user

-- 
I'm very PUBLIC-MINDED, I'm helping a NIGERIAN get his $25,000,000 back!