Python: tornado Web server of friendfeed

Source: Internet
Author: User

The code is very simple, with less than 5 k lines. However, the idea is quite good. After we change to non-blocking, the efficiency can be improved a lot. Especially considering that modern web apps need to communicate with other HTTP servers, blocking costs a lot.

Tornado is an open source version of The scalable, non-blocking web server and tools that power friendfeed. the friendfeed application is written using a Web framework that looks a bit like web. PY or Google's webapp, but with additional tools and Optimizations to take advantage of the underlying non-blocking infrastructure.
The framework is distinct from most mainstream Web Server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. because it is non-blocking and uses epoll, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. we built the Web server specifically to handle friendfeed's real-time features-every active user of friendfeed maintains an open connection to the friendfeed servers. (For more information on Scaling servers to support thousands of clients, see the c10k problem .)
See the tornado documentation for a detailed walkthrough of the framework.

Tornado: Facebook releases Python framework as open source

Http://www.linux-magazine.com/Online/News/Tornado-Facebook-Releases-Python-Framework-as-Open-Source

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.