The full name of Tornado is Torado Web server, which is known to be used as Web servers, but it is also a development framework for the Python web. It was originally used on the FriendFeed company's website and was open source after Facebook acquired it.
As a web framework, it is a lightweight web framework, similar to another Python web framework web.py, which has asynchronous non-blocking IO processing.
As a Web server, Tornado has an excellent load-resisting capability, and the official use of Nginx reverse proxy to deploy the tornado and other Python Web application framework for comparison, resulting in a maximum of more than the number of views of the second nearly 40%.
In addition, its source code is a great material for Python developers to learn and study.
The following is the Hello World sample program for tornado.
#-*-coding:utf-8-*-#!/usr/in/pythonImportTornado.ioloopImportTornado.webclassMainHandler (tornado.web.RequestHandler):defGet (self): Self.write ("Hello, World") Application=Tornado.web.Application ([(R"/", MainHandler),])if __name__=="__main__": Application.listen (8888) tornado.ioloop.IOLoop.instance (). Start ()
Before executing the program, install it on Ubuntu:
sudo Install tornado
Python web framework for asynchronous non-blocking IO--tornado