twitter-archive / snowflake

Snowflake is a network service for generating unique ID numbers at high scale with some simple guarantees.
http://twitter.com/
7.68k stars 1.13k forks source link

A quick question about new IDs. #7

Closed tarnfeld closed 12 years ago

tarnfeld commented 12 years ago

Hey. Trying not to sound too much like a noob here but..

I'm going to assume this isn't incremental, from near 0, since its based on time, right? I'm interested in using this to generate IDs I can insert into Amazon DynamoDB for primary keys, and to generate a short URL. Currently my method of generating the short url (The suffix) will expand the number of characters used in the string as the numbers passed in get higher, my worry is since Snowflake is always returning 64 bit ids, will the numbers always be 10765432100123456789 this long, or will that start of smaller?

I appreciate any reply to this, I know this isn't the right place but was hopping someone might be able to explain ;-)

Thanks.

ryanking commented 12 years ago

I don't think snowflake is the right solution for you.

tarnfeld commented 12 years ago

Me neither, thanks!