3 ms·
But when we render the Comment back to you in that same request we need the ID that the comment will have, but we don't know the ID until we write it out. Wo
by iampims 16y ago
But when we render the Comment back to you in that same request we need
the ID that the comment will have, but we don't know the ID until we write it out.
Wouldn't something like Snowflake help for this particular case?
Snowflake is a network service for generating unique ID numbers
at high scale with some simple guarantees.
http://github.com/twitter/snowflake http://github.com/twitter/snowflake
Kellan (from Flickr) has a neat post about Ticket servers: http://laughingmeme.org/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ http://laughingmeme.org/2010/02/08/ticket-servers-distribute...