Facebook just announced that it has released Tornado, the real-time web framework that powers FriendFeed, as open source code. According to Facebook's David Recordon, Tornado is one of the core infrastructure pieces that power FriendFeed's real-time functionality. The framework, according to Recordon, is similar to other Python frameworks like Google's webapp or web.py, but is faster and able to handle more simultaneous traffic than its competitors. On his personal blog, Bret Taylor, one of the co-founders of FriendFeed, explains the technical details behind Tornado in more detail.
Tornado is available under the Apache open source license. A basic demo of Tornado showing the commenting feature is available here.
Developers will now be able to tap into one of the core infrastructure pieces that made FriendFeed tick so well. While other services (like Twitter) tend to have a lot of trouble to scale up when they grow, FriendFeed never ran into these problems and Tornado was surely one of the main reasons why the site managed to stay up and running even when demand spiked during major events.
Here is what developers will get when they implement Tornado according to Bret Taylor:
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. We ran some simple load tests against some other popular Python frameworks, and Tornado's baseline throughput was over four times higher than the other frameworks

Comments
Subscribe to comments for this post OR Subscribe to comments for all ReadWriteWeb posts
This is really cool. Big props to Facebook for releasing this.
This is interesting in the light of Google Wave.
Surely both aren't focusing on the same target audience/purposes but there's certainly overlap.
This is great news! I will be looking very closely at this for one of my projects.
However, I am a bit concerned over the claims of speed that Bret Taylor made on his blog (as quoted above). He says: "Tornado's baseline throughput was over four times higher than the other frameworks" but 8213 is not over four times higher than the 2223 for Django (it is about 3.7 times). Also, that figure of 8213 was obtained by running four simultaneous front-ends - running 1 single-threaded front-end, Tornado was only 50% faster than Django. It would be interesting to know what the figures are for Django and web.py if nginx (a proxy server) is used to provide four front-ends to them. A comparison with some popular non-Python frameworks would also have been useful.
It is still a great achievement so I feel it is a shame that Bret spoiled it slightly by making inflated claims about the performance.
Just my 2c.
Sweet! We knew something interesting was going to happen from the FB/FF 'merger', but I'm really happy to see them release this so quickly, and especially under the Apache License.
Now if the developers.facebook.com open source page just noted that many of the projects are based at Apache or the Apache Incubator (like Hadoop, Thrift, Hive, Cassandra), it'd be perfect.