Facebook 的新 Tornado 框架是什么?
Facebook just open-sourced a framework called Tornado.
What is it? What does it help a site do?
I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它看起来像是一个针对高并发和高可扩展性进行优化的网络服务器,但针对较小的有效负载而设计。
它旨在很好地支持 10,000 个并发用户。
它将在 LMP 堆栈上运行,但它取代了 Apache。
请参阅 C10K 问题。
It looks like it is a web-server optimized for high-concurrency and high-scalability, but made for smaller payloads.
It was designed to support 10,000 concurrent users well.
It will run on a LMP stack, but it takes the place of Apache.
See the C10K problem.
它具有带有阻塞查询的'数据库'模块。也许他们运行该服务器的多个实例以最大程度地减少阻塞问题,并且可能它不用于整个好友推送,仅用于与实时行为相关的某些部分(我听说HTTP连接持续打开以检查更新,并且线程行为将是对此不利)。
我认为它不能用作任何 Web 应用程序的通用框架。
It has 'database' module with blocking queries. Maybe they run multiple instances of this server to minimize blocking problems and maybe it is not used for whole friendfeed, only in some parts related to real-time behavior (i heard that HTTP connections persist open to check for updates, and threading behavior would be bad for this).
I don't think it is usable as general-purpose framework for any web applications.
Tornado 是一个简单、快速的 Python Web 服务器和微型 Web 框架。它提供了编写动态网站的基本框架。它非常容易学习和扩展,以满足要求严格的 Web 应用程序的特定需求,因为它不会妨碍您。使用 Tornado 最好的部分是它不会为每个请求创建线程,因此可以很好地适应大量请求。我正在将它用于我的一个项目并且喜欢它。
Tornado is a simple, fast python webserver and a micro web framework. Its provides the very basic framework to write a dynamic website. Its very easy to learn and extend to meet specific need of a demanding web application since it does not come in your way. The best part of using Tornado is it does not create thread per request so scales very nicely for large number of requests. I am using it for one of my project and loving it.