Facebook just open-sourced a framework called Tornado.
What is it? What does it help a site do?
I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack?
Facebook just open-sourced a framework called Tornado.
What is it? What does it help a site do?
I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack?
It looks like it is a web-server optimized for high-concurrency and high-scalability, but made for smaller payloads.
It was designed to support 10,000 concurrent users well.
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 epoll, 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 C10K problem.)
It will run on a LMP stack, but it takes the place of Apache.
See the C10K problem.
I wonder how they're going to process blocking sql queries using this single-threaded non-blocking webserver...
It has 'database' module with blocking queries. Maybe they run multiple instances of this server to minimize blocking problems and maybe it is not used for whole friendfeed, only in some parts related to real-time behavior (i heard that HTTP connections persist open to check for updates, and threading behavior would be bad for this).
I don't think it is usable as general-purpose framework for any web applications.
Looking for an alternative (single threaded, asynchronous, event driven high performance web server) running on the JVM?
(Disclaimer: I'm a Deft committer)