3 ms·
He could have just Googled. I think Twitter's Snowflake came to some very similar conclusions. https://github.com/twitter/snowflake/ https://github.com/twitter
by lectrick 12y ago
He could have just Googled. I think Twitter's Snowflake came to some very similar conclusions.
https://github.com/twitter/snowflake/ https://github.com/twitter/snowflake/
I even wrote something in Ruby as an idea based off it (although it hasn't been used in production yet)
https://github.com/pmarreck/ruby-snippets/blob/master/star_id.rb https://github.com/pmarreck/ruby-snippets/blob/master/star_i...
- michaelmior 12y agoAnother (old) example of how Flickr does (or quite possibly "did") this http://code.flickr.net/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ http://code.flickr.net/2010/02/08/ticket-servers-distributed...
- espeed 12y agoAlso see... Simpleflake (like Snowflake, but uses a random number in place of the coordinated worker ID and sequence number): http://engineering.custommade.com/simpleflake-distributed-id-generation-for-the-lazy/ http://engineering.custommade.com/simpleflake-distributed-id... "How to Generate a Sequence of Unique Random Integers", which uses prime number quadratic resides: http://preshing.com/20121224/how-to-generate-a-sequence-of-unique-random-integers/ http://preshing.com/20121224/how-to-generate-a-sequence-of-u...