<p><ahref="http://www.tornadoweb.org/">Tornado</a> is an open source version of the scalable, non-blocking web server and tools that power <ahref="http://friendfeed.com/">FriendFeed</a>. The FriendFeed application is written using a web framework that looks a bit like <ahref="http://webpy.org/">web.py</a> or <ahref="http://code.google.com/appengine/docs/python/tools/webapp/">Google's webapp</a>, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.</p>
<p>The framework is distinct from most mainstream web server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. Because it is non-blocking and uses <ahref="http://www.kernel.org/doc/man-pages/online/pages/man4/epoll.4.html">epoll</a>, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. We built the web server specifically to handle FriendFeed's real-time features — every active user of FriendFeed maintains an open connection to the FriendFeed servers. (For more information on scaling servers to support thousands of clients, see The <ahref="http://www.kegel.com/c10k.html">C10K problem</a>.)</p>
<p>See the <ahref="/documentation">Tornado documentation</a> for a detailed walkthrough of the framework.</p>
<p>The Tornado source code is <ahref="http://github.com/facebook/tornado">hosted on GitHub</a>.</p>
<h3>Prerequisites</h3>
<p>Tornado has been tested on Python 2.5 and 2.6. To use all of the features of Tornado, you need to have <ahref="http://pycurl.sourceforge.net/">PycURL</a> and a JSON library like <ahref="http://pypi.python.org/pypi/simplejson/">simplejson</a> installed. Complete installation instructions for Mac OS X and Ubuntu are included below for convenience.</p>