首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Python:FriendFeed的Tornado Web Server

Python:FriendFeed的Tornado Web Server

作者头像
张善友
发布2018-01-31 12:06:36
发布2018-01-31 12:06:36
7070
举报
文章被收录于专栏:张善友的专栏张善友的专栏

代码很简单,不到5k行。但是思路挺好的,改成non-blocking了之后效率就是能提高不少,特别是考虑到现代的web app都需要和其他的HTTP服务器通信,blocking的代价太大了。

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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2009-09-12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档