Tornado Web Server 2.0 releases non-blocking IO Web servers software

Source: Internet
Author: User
Keywords Non-blocking Tornado Server Software
Tags aliyun blocking different framework html http python recommended to

Tornado Web Server is a very lightweight, highly scalable, and non-blocking io http://www.aliyun.com/zixun/aggregation/17117.html ">web Server software written using Python, The famous Friendfeed website is built using it.

Unlike other mainstream Web server frameworks (primarily the Python framework), Tornado uses Epoll non-blocking io, which responds quickly, handles thousands of concurrent connections, and is especially useful for real-time web services.

To use it, you must follow these kits:

1 python (recommended Python 2.5/python 2.6)

2) Simplejson (recommended to use Simplejson 2.0.9)

3) CURL (recommended to use CURL 7.19.7 or above)

4) Pycurl (recommended to use Pycurl 7.16.2.1)

5 Tornado Web Server (This is the protagonist, version of the latest installation of the official online bar)

The open source Python Web Server + Framework from FriendFeed, which has been acquired by Facebook, is a lot like GAE. Source code in:

Http://github.com/facebook/tornado

If you can't access tornadoweb.org, you can download the latest version 0.2 from the place I backed up:

Http://web.me.com/v2ex.livid/tornado/tornado-0.2.tar.gz

Installation method:

Tar xvzf tornado-0.2.tar.gzcd tornado-0.2python setup.py buildsudo python setup.py install

Hello World Example:

Import Tornado.httpserverimport tornado.ioloopimport tornado.webclass MainHandler (tornado.web.RequestHandler): def Get (self): Self.write ("Hello, World") Creator = Tornado.web.Application ([(R "/", MainHandler),]) If __name__ = "__ main__ ": Http_server = Tornado.httpserver.HTTPServer (creator) Http_server.listen (8888) Tornado.ioloop.IOLoop.instance (). Start ()

This is the technology that FriendFeed already uses in the production environment, and its implementation and usage are excellent. In short, it is a very worthwhile learning framework.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.