Twitter Open Sources Snowflake, An ID Number Generator

Snowflake IconTired of generating new ideas within a distributed database system for billions of messages? We’re getting tired too! Thankfully, Twittter has open sourced a new product this evening called “Snowflake”, which enables developers to generate new ID numbers, by combining timestamp, worker number, and sequence number, something produced through Apache Zookeeper.

If all this sounds relatively complex, that’s because it is. Twitter is dealing with billions of messages that need to be indexed in a short amount of time. As such, they needed an easier solution beyond integers, the method they previously used. If your startup isn’t dealing with such scalability issues, don’t be jealous! However once you do get to such levels, Facebook and Twitter have both open sourced enough products that you should now have plenty of help.

Given that Twitter is producing so many messages at such a quick rate, they’ve decided to use Cassandra (a project first open-sourced by Facebook) as well as sharded MySQL databases (using gizzard, an automated sharding system first open-sourced by Twitter) to scale quickly. In order to have unique identifiers across each of these messages, the company needed a solution which worked within a distributed system.

The result was Snowflake. If you want the full details you can find them here, and download the code from GitHub here.

If you want to learn more about building the infrastructure for large scale web applications, come to our upcoming Social Developer Summit later this month in San Francisco.

-Social Developer Summit Banner-

Snowflake image found via Discovery Channel.

  Tags: ,
  • Interesting... glad to see Twitter isn't (or can't) keeping the code all to themselves.
  • hi
  • Hope all the bugs can be removed in short time and we can enjoy the opportunities given by snowflake.
  • Thanks for the news, and Snowflake is new product that have bugs and full working version will be released soon. But now is the best solution for twitter problem.
  • It's great news for the rest of the community as it's one less tool for locking in Twitter's rapidly growing microblogging monopoly.
blog comments powered by Disqus
-Download Facebook Pages eBook Promotion-

Upcoming Events

Think Mobile - West

September 23, 2010 | Mission Bay Conference Center at UCSF, San Francisco

Think Mobile Logo

Reinvent Your Business -- Innovate with unique mobile offerings and understand key mobile metrics.

Smartphone Games Summit

September 24, 2010 | Hotel Nikko, San Francisco

Smartphone Games Summit Logo

The Smartphone Games Summit is a one-day conference focused on the emerging smartphone games space.

Social Ad Summit

October 1, 2010 | The New Yorker Hotel, New York City

Social Ad Summit Logo

Strengthen your brand through social media: Best practices for social media marketing & advertising.

Virtual Goods Summit - West

October 12-13, 2010 | Moscone West, San Francisco

Virtual Goods Summit Logo

Once restricted to the world of online gaming, virtual goods and currencies are beginning to influence the development of social networks, community sites, and many other new and exciting markets.