Twitter's UID associated to each tweet will very soon exceed 2,147,483,647
twitpocalypse.com
twitpocalypse.com
Sure it takes more room but space it cheap, and it makes syncing and distributed databases so much easier (not tied to one machine or cluster)
http://www.sqlite.org/faq.html
What is the point of creating a website like this?
"3 the average tweets per second and the Twitpocalypse date are a rough approximation, please do not schedule any vacation around that date"
irb > "2,147,483,647".gsub(",","").to_i + 1
2147483648
(Forgive the extra code necessary to strip out the commas. The Windows irb console leaves a little to be desired in terms of midline editing.)
irb(main):002:0> 2_147_483_647 + 1
=> 2147483648
"Twitter is seeing about 200 tweets per second, during peak loads. - Robert Scoble"
Note "during peak loads", so 83 is probably not too far off.
2 at a rate of 151 tweets per seconds
There, fixed, send check for $20 to donations@redcross.org
Call me back when they reach 18446744073709551615
I had to do this a couple of years back when I realized I had a table that'd grow quickly:
http://snippets.dzone.com/posts/show/4422
Feel free to send the donation to the same place.
You just made my day. I haven't laughed so hard in ages ;)
But then you would have had 64 bit ID by default anyway.
I wonder what proportion of the total is human-typed, and how much is machine generated?
http://news.ycombinator.com/item?id=648725
"Just 10% of Twitter users generate more than 90% of the content, a Harvard study of 300,000 users found."
I'd expect most of it is machine generated.
2088840357 2088840362 (difference of 5, and that's without a real public timeline where you could easily prove each tweet takes the next number in a sequence)
So it isn't as if they're using UUIDs or something unique... they very much seem to be relying on a single counter (currently).
You'd end up with globally unique ids, and as long as your writes were (approx.) evenly distributed, all 5 sequences would be (approx.) close to each other.
Who knows, they might have 100 writable dbs, with only 70% up at any point in time, meaning only 70% of all integers are actually used.. anyway, I don't know, I can just imagine them doing something like this if they wanted certain things from the system.
Note that one can delete a message, which could explain some gaps.
Two billion tweets would be 1M people posting 2k tweets each, or 100M people posting 20 tweets each.