X

Facebook open-sources real-time FriendFeed facet

Company makes real-time technology of new acquisition open source. Developers interested in incorporating Tornado into their Web service can do that now.

Don Reisinger
CNET contributor Don Reisinger is a technology columnist who has covered everything from HDTVs to computers to Flowbee Haircut Systems. Besides his work with CNET, Don's work has been featured in a variety of other publications including PC World and a host of Ziff-Davis publications.
Don Reisinger
3 min read

Facebook announced on Thursday that it has open-sourced recently acquired FriendFeed's real-time technology. Dubbed Tornado, the company's real-time, nonblocking framework is written in Python.

"Tornado is...designed to handle thousands of simultaneous connections, making it ideal for real-time Web services," Facebook's David Recordon wrote in a blog post. "While Tornado is similar to existing Web frameworks in Python (Django, Google's Webapp, Webpy), it focuses on speed and handling large amounts of simultaneous traffic."

FriendFeed co-founder and new Facebook Director of Products Bret Taylor said in a blog post of his own that Facebook's decision to open-source Friendfeed's real-time feature was rooted in its desire to see "others building real-time Web services." It's a part of Facebook's open-source initiative.

Taylor went on to explain the story behind Tornado. He said that before FriendFeed developed the framework, it analyzed other Python frameworks to see if they matched FriendFeed's needs. According to Taylor, "our performance and feature requirements consistently diverged from these mainstream frameworks." FriendFeed needed "support for a large number of standing connections afforded by the nonblocking (input-output) programming style and epoll" that it couldn't find in existing Python frameworks.

Taylor's team decided to write its "own Web server and framework after looking at existing servers and tools" that couldn't quite match the company's requirements.

According to Taylor, "Tornado looks a bit like Webpy or Google's Webapp, but with additional tools and optimizations to take advantage of the nonblocking Web server and tools."

Tornado features several key components that Facebook hopes will make it easy for developers to create real-time environments. It offers design templates, signed cookies, user authentication, forgery protection, and third-party authentication for services like Facebook Connect, Twitter, and FriendFeed. The framework also supports "large numbers of concurrent connections" to keep data fresh.

Taylor said his team ran some baseline throughput calculations to determine how well Tornado matched up against other Python frameworks. According to his figures, Tornado's throughput was more than "four times higher than the other frameworks."

Tornado
Tornado's Web server requests compared to the competition. Bret Taylor

FriendFeed will live on
Before you think this is the end of FriendFeed as we know it, think again.

Buried in the Facebook announcement, David Recordon wrote that "Tornado is a core piece of infrastructure that powers FriendFeed's real-time functionality, which we plan to actively maintain."

Since Facebook's acquisition of FriendFeed, the social network has stayed silent on its plans for FriendFeed. If his statement is to be believed, FriendFeed will be maintained and improved upon, going forward. When the acquisition was announced, FriendFeed's founders said the long-term plans for FriendFeed were still being worked out with Facebook, but at the very least, it wouldn't be shut down.

"Anything that we would do would be more of a transition, not shutting down," Taylor told CNET News. "I think our users have invested in our product by putting their data in it, sharing it with their friends...We absolutely wouldn't shut (FriendFeed) down."

Tornado is available now as a free download. Facebook said it hopes that developers will try it out and start developing Web services that take advantage of FriendFeed's real-time technology. Whether or not that will happen remains to be seen, but if you want to a see a demo of Tornado in action to see if it matches your goals as a developer, click here.