3 ms·
Slightly related question- does anyone know what data type Reddit uses for their post/comment id? It seems like a short alphanumeric yet unique identifier and
by busymom0 5y ago
Slightly related question-
does anyone know what data type Reddit uses for their post/comment id? It seems like a short alphanumeric yet unique identifier and much shorter than a uuid.
Also what does twitter use for their post/comment id? Seems like some sort of big int?
- Dachande663 5y agoTwitter created Snowflake many years ago to generate IDs. Unsure whether it’s still in use. https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake https://blog.twitter.com/engineering/en_us/a/2010/announcing...
- erwincoumans 5y agoThat sounds nice and simple, and fits in 64 bits (vs 128): "we settled on a composition of: timestamp, worker number and sequence number. Sequence numbers are per-thread and worker numbers are chosen at startup via zookeeper"
- erwincoumans 5y agoTwitter uses strings instead of ints to represent the 64 bit UID, because Javascript only supports 53bit ints instead of 64bit... https://developer.twitter.com/en/docs/twitter-ids https://developer.twitter.com/en/docs/twitter-ids