When comparing Tornado vs Klein, the Slant community recommends Tornado for most people. In the question“What are the best general-purpose Python web frameworks usable in production sites?” Tornado is ranked 7th while Klein is ranked 20th. The most important reason people chose Tornado is:
Tornado can scale to several open connections at the same time. This makes it perfect for applications where performance is very important.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Designed for performance
Tornado can scale to several open connections at the same time. This makes it perfect for applications where performance is very important.
Pro Amazing asynchronous functionalities
Pro More concurrent requests, more interactivity
The fact that a Klein server is event-driven and non-blocking means that it can start handling a new request while previous requests are still open. This lets you serve more requests from a single process, meaning running multiple servers is now an option to be explored when your site makes it big, rather than a necessity for responsiveness under even modest loads.
Multiple requests per process also gives you flexibility to do things that would be impractical in WSGI-based alternatives like Flask or Bottle, such as keeping a connection to the browser open to send it chat messages or game updates in a Server Sent Event stream.
Cons
Con It's usually useful only when building real-time web applications
Because it's basically a framework for building real-time applications it has great support for things like WebScokets and uses non-blocking I/O. But it lacks in features that are used to build general-purpose websites like blogs, e-commerce sites, web portals etc...
For example it lacks ORM integration (at least out of the box) and it doesn't have a very powerful template engine.
Con Lacks database integration
Talking to database is a pretty common thing for a web application to do. Larger frameworks know this, and cover it in some detail by the end of the tutorial. In contrast, the Klein documentation is currently silent on this topic, leaving the issue of how to do database queries in a way that won't block your event-driven code entirely up to you.