10

我有点困惑,Tornado是像 apache http 服务器这样的 web 服务器,还是像 django 这样的框架,或者两者兼而有之?

谢谢

4

3 回答 3

12

如果你想用 Tornado 制作一些应用程序,Tornado 是一个服务器和框架。

我使用 Tornado 为我的 django 应用程序提供服务,借助nginx(负载均衡器运行超过 1 个 Tornado 实例)和主管在我的应用程序失败时使这些龙卷风存活。

我使用WebFaction,我的应用程序的性能通过 Tornado 得到了改善,而不是使用 apache 为它们提供服务。

于 2011-02-21T21:27:38.920 回答
2

Tornado is both a non-blocking web server and a lightweight web framework.

It can act as web server to other web frameworks such as Django through the use of tornado.wsgi, but also possesses a core web framework with functionality such as templating (tornado.template), SQL database integration (tornado.database), and OpenID authorization (tornado.auth). Many developers use it for its superior performance as a non-blocking web server in conjunction with other wsgi capable frameworks, but it's much more than just a web server.

Tornado Documentation

于 2012-11-14T00:34:00.837 回答
1

Tornado 是异步的(+ 单线程)和事件驱动的。Apache http 和 django 不是。

“Django vs Tornado” 一场 持续的 火焰 战争

恕我直言,我将从 Tornado 开始(如果您喜欢 JVM,也可以使用Deft )。

免责声明:我是 Deft 提交者。

于 2011-02-21T20:18:35.913 回答