Home >Backend Development >Python Tutorial >What is Tornado? A brief introduction to Tornado

What is Tornado? A brief introduction to Tornado

不言
不言forward
2018-10-11 14:38:086806browse

This article brings you what is Tornado? This brief introduction to Tornado has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Tornado is a general name for a scalable non-blocking web server and related tools. Tornado can handle thousands of connections per second, so it is an ideal web framework for real-time web services.

Tornado, as the basic framework of the FriendFeed website, was released on September 10, 2009. It has received support from many communities and has been used in a series of different scenarios. In addition to FriendFeed and Facebook, many companies are turning to Tornado.

Compared with other Python network frameworks, Tornado has the following characteristics:

  • Complete Web framework: Like Django and Flask, Tornado also provides URL routing mapping and Request context. , template-based page rendering technology and other essential tools for developing web applications.

  • is an efficient network library whose performance is comparable to underlying Python frameworks such as Twisted and Gevent: it provides asynchronous I/O support and timeout event processing, which makes Tornado not only a Web In addition to the application server framework, it can also be used for backend applications such as crawler applications, IoT gateways, and game servers.

  • Provide efficient HTTPClient: In addition to the server-side framework, Tornado also provides an HTTP client based on the asynchronous framework.

  • Provide efficient internal HTTP server: Although other Python network frameworks (Django, Flask) also provide internal HTTP servers, their HTTP servers can only be used in test environments due to performance reasons . Tornado's HTTP server is closely integrated with Tornado asynchronous calls and can be directly used in production environments.

  • Complete WebSocket support: WebSocket is a new standard in HTML5 that enables two-way real-time communication between the browser and the server.

Because of the above characteristics of Tornado, Tornado is often used as an interface service framework for large sites, rather than focusing on building complete large websites like Django.

In addition, user authentication is a necessary function for almost all websites, especially for social networking sites such as FriendFeed and Facebook, the source of Tornado development. Therefore, the Tornado framework itself integrates the richest user authentication functions than other Python frameworks. Using this framework, developers can quickly develop secure and powerful user identity authentication mechanisms, such as cookie mechanisms, user identity authentication, preventing cross-site attacks, etc.

The above is the detailed content of What is Tornado? A brief introduction to Tornado. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete