Tuesday, September 22, 2009

Facebook Open Sources FriendFeed’s Real-Time Tech

Facebook is open sourcing a portion of FriendFeed named Tornado, a real-time web framework for Python.
Facebook employee, Dave Recordon, explains the open-sourcing today on Facebook’s Developers blog.

Tornado is a relatively simple, non-blocking Web server framework written in Python, designed to handle thousands of simultaneous connections, making it ideal for real-time Web services.

While Tornado is similar to existing Web-frameworks in Python (Django, Google’s webapp, web.py), it focuses on speed and handling large amounts of simultaneous traffic.
Three key parts of Tornado:
All the basic site building blocks – Tornado comes with built-in support for a lot of the most difficult and tedious aspects of web development, including templates, signed cookies, user authentication, localization, aggressive static file caching, cross-site request forgery protection, and third party authentication like Facebook Connect. You only need to use the features you want, and it is easy to mix and match Tornado with other frameworks.
Real-time services – Tornado supports large numbers of concurrent connections. It is easy to write real-time services via long polling or HTTP streaming with Tornado. Every active user of FriendFeed maintains an open connection to FriendFeed’s servers.

High performance – Tornado is pretty fast relative to most Python web frameworks. Tornado’s baseline throughput was over four times higher than the other frameworks.

No comments:

Post a Comment