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.