In message <[EMAIL PROTECTED]>, Glen B
<[EMAIL PROTECTED]> writes
It's not overkill if you need a multi-app/multi-process service that offers
a single source for sequential keys. The other option is disk file locking.
Any way you look at it, you have to go to one place for the key. Don't relay
on O/S random numbers either. Even those are flawed at high resolution.
Ummm....
My first reaction to this was "linux has a guaranteed true random number
generator" - the only problem is that if it runs out of randomness it
simply stops generating and anything asking for a number has to wait.
Oh - and what do you mean by "high resolution"? I think that, if you
have a true random number generator, the chances of having a collision
approach 50% when you've used only 10% of the number space. (The classic
question about this is "how many people do you need in a room to have
even odds that two of them will share a birthday?". I think the answer
is "about 20".)
But then, if you want unique, pseudo-random keys, I think there are
generators that are guaranteed to return every possible number, only
once, each cycle through the number space.
None of this, however, solves the OP's original problem, I don't
think...
Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/