Introducing Tornado

The traditional model for creating applications such as web servers that support several clients concurrently is based on a multithread system in which a new thread is created for each client that connects to the service. This results in a fairly high consumption of system resources and performance problems, which can be quite serious.

Tornado is a module written in Python that allows you to create asynchronous and non-blocking systems for network operations, where each request executed by a client can be asynchronous. The way in which the library is implemented allows you to scale to several thousand open connections, something that is ideal for applications that require connections with a long lifetime.

You can install it with the pip install tornado command or download the latest version that's available from our the GitHub repository (https://github.com/tornadoweb/tornado) and install it manually using the setup.py script.

Tornado can be considered an alternative to Twisted and is suitable for handling a large number of connections since it can respond to an incoming client, send a request to the controller, and not return a control to the client until the result of the call is obtained. Asynchronous processing facilitates functional decoupling and access to shared data. This works very well with a stateless design such as REST, or other service-oriented architectures.

You can get more information about the framework and the source code in the GitHub repository: https://github.com/tornadoweb/tornado.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset