3 ms·
Great post. I wrote this after reading it where a simple and reliable solution to the ID generation problem is described: https://news.ycombinator.com/item?id=1
by antirez 11y ago
Great post. I wrote this after reading it where a simple and reliable solution to the ID generation problem is described: https://news.ycombinator.com/item?id=10606910 https://news.ycombinator.com/item?id=10606910
- mmalone 11y agoGood idea! But it looks like you re-invented a SHA/counter based CSPRNG :). That's not necessarily a bad thing, but there are probably library CSPRNGs that work as well and hide some details. Also, it's not generally any more or less likely to produce collisions than the method we're using. The probability of collision is dependent on the hash function / PRNG being used.