Home Php C# Sql C C++ Javascript Python Java Go Android Git Linux Asp.net Django .net Node.js Ios Xcode Cocoa Iphone Mysql Tomcat Mongodb Bash Objective-c Scala Visual-studio Apache Elasticsearch Jar Eclipse Jquery Ruby-on-rails Ruby Rubygems Android-studio Spring Lua Sqlite Emacs Ubuntu Perl Docker Swift Amazon-web-services Svn Html Ajax Xml Java-ee Maven Intellij-idea Rvm Macos Unix Css Ipad Postgresql Css3 Json Windows-server Vue.js Typescript Oracle Hibernate Internet-explorer Github Tensorflow Laravel Symfony Redis Html5 Google-app-engine Nginx Firefox Sqlalchemy Lucene Erlang Flask Vim Solr Webview Facebook Zend-framework Virtualenv Nosql Ide Twitter Safari Flutter Bundle Phonegap Centos Sphinx Actionscript Tornado Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 75

73
votes
answers
11 views
+10

How do I get the client IP of a Tornado request?

I have a RequestHandler object for incoming post()s. How can I find the IP of the client making the request? I've browsed most of RequestHandler's methods and properties and seem to have missed something.

up vote 47 down vote accepted favorite
沙发
+470
+50

RequestHandler.request.remote_ip (from RequestHandler's instance)

you can inspect the response like:

...
class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write(repr(self.request))
...

文件:tornadoweb.org/en/stable/... - trss 2016年5月10日8:07

+260

mykhal's answer is right, however sometimes your application will be behind a proxy, for example if you use nginx and UWSGI and you will always get something like 127.0.0.1 for the remote IP. In this case you need to check the headers too, like:

x_real_ip = self.request.headers.get("X-Real-IP")
remote_ip = x_real_ip or self.request.remote_ip

remote_ip = x_real_ip或self.request.remote_ip - itzhaki 2015年9月6日12:09

@itzhaki感謝你的建議,我更新了我的答案 - 3k- 2015年11月26日13:25

@itzhaki @ 3k但文檔(tornadoweb.org/en/stable/...)說“如果設置了HTTPServer.xheaders,將傳遞X-Real-Ip或X-Forwarded中負載均衡器提供的真實IP地址 - 對於標題“。因此,remote_ip從標題返回X-Real-Ip或X-Forwarded-For。 - igaurav 2016年5月10日9:53

@igaurav所以我希望簡單地使用remote_ip現在可以正常工作。我的解決方案來自於練習,因為我發現在過去是必要的,當我嘗試時,remote_ip給出了錯誤的結果。 - 3k- 2016年8月17日9:10

但是如果你不是那種代理並且使用那種邏輯,攻擊者可以通過發送X-Real-IP頭來偽造客戶端IP地址。 - 羅蘭韋伯18年9月26日7:07

6
votes
answers
11 views
+10

Accessing web request globally in Tornado

I need to be able to access the currently executing web request in Tornado deep within my application without passing it down through all of my methods. When the request is first received I want to assign a trace id to it and then every time a message gets logged I want to include it in the logging information.

Is there some global information somewhere that I can use in Tornado to identify the current request that's being processed?

Thanks!

沙发
+60

Tornado's StackContext is the way to do this.

Here's an example: https://gist.github.com/simon-weber/7755289.

1
votes
answers
15 views
+10

How do I determine the appropriate check interval?

I'm just starting to work on a tornado application that is having some CPU issues. The CPU time will monotonically grow as time goes by, maxing out the CPU at 100%. The system is currently designed to not block the main thread. If it needs to do something that blocks and asynchronous drivers aren't available, it will spawn another thread to do the blocking operation.

Thus we have the main thread being almost totally CPU-bound and a bunch of other threads that are almost totally IO-bound. From what I've read, this seems to be the perfect way to run into problems with the GIL. Plus, my profiling shows that we're spending a lot of time waiting on signals (which I'm assuming is what __semwait_signal is doing), which is consistent with the effects the GIL would have in my limited understanding.

If I use sys.setcheckinterval to set the check interval to 300, the CPU growth slows down significantly. What I'm trying to determine is whether I should increase the check interval, leave it at 300, or be scared with upping it. After all, I notice that CPU performance gets better, but I'm a bit concerned that this will negatively impact the system's responsiveness.

Of course, the correct answer is probably that we need to rethink our architecture to take the GIL into account. But that isn't something that can be done immediately. So how do I determine the appropriate course of action to take in the short-term?

沙发
+10

The first thing I would check for would be to ensure that you're properly exiting threads. It's very hard to figure out what's going on with just your description to go from, but you use the word "monotonically," which implies that CPU use is tied to time rather than to load.

You may very well be running into threading limits of Python, but it should vary up and down with load (number of active threads,) and CPU usage (context switching costs) should reduce as those threads exit. Is there some reason for a thread, once created, to live forever? If that's the case, prioritize that rearchitecture. Otherwise, short term would be to figure out why CPU usage is tied to time and not load. It implies that each new thread has a permanent, irreversible cost in your system - meaning it never exits.

我很肯定線程正在退出。另外,我看到負載下的性能差異。只是負載導致CPU時間增長得更快。 - 傑森貝克2010年8月29日16:59

18
votes
answers
21 views
+10

The latest recommendation for Comet in Python? [closed]

I'm going to be implementing Comet in Python (even though I hear good things about erlycomet I'm not thrilled about supporting an Erlang-based web server in addition to everything else in our back end). I've found several possibilities:

(there are also some other choices that interface with Java servers, but I'm not interested in those)

Can somebody make a recommendation among these implementations, considering performance, community, and ease of implementation?

沙发
+80

I am personally using Orbited, both because I am already using Twisted and because it seems mature. Twisted has a nice long history with many users, especially in comparison to Diesel and Tornado. Orbited is indeed built on Twisted.

There is a good blog entry covering an end-to-end orbit solution here. It sends data from a python script to a STOMP server (MorbidQ) to Orbited to Javascript - rendering that data as a graph.

Tornado seems pretty new to the scene, I couldn't find twisted-comet and I hadn't heard of diesel. I particularly like the way that Orbited can forward any sort of tcp/ip but makes it easy to hook javascript clients in with a message passing STOMP backend.

板凳
+50

I'd recommend Orbited if you're looking to write a Comet app.

What makes Comet more complex to implement (than making an Ajax app, say), is that you need both the client (a Comet javascript client) and the server (an asynchronous webserver like Twisted) working in conjunction, and this is what you get with Orbited - both the javascript client and the server.

Both Tornado and Diesel provide mainly the async server part, but are missing the important client javascript code.

Plus, there is a pretty good community around Orbited, and several people are building cool apps with it, this pages shows a couple of those apps: http://orbited.org/wiki/Sites

地板
+20

I've also been using Twisted. But instead of Orbited, I'm using Nevow.Athena. It's really simple: learn more reading the LiveElement tutorial.

注意:divmod.org網站剛剛崩潰,不太可能再次上線。我相信最新版本的LiveElement教程在這裡:web.archive.org/web/20101012035741/http://divmod.org/trac/wiki/... - Kevin Horn 7月20日在23:41

此外,一些舊的Divmod文檔在這裡:divmodsphinx.funsize.net - Kevin Horn 7月20日'12在23:42

4楼
+20

Are you settled on Comet? Why not WebSockets? If the latter is also an option, I'd like to refer https://github.com/tavendo/AutobahnPython which implements WebSockets in Twisted (documentation is available on http://autobahn.ws/python). It is standards compliant, has message-based basic API and advanced API for frame-based/streaming processing and many more goodies.

WebSockets需要Flash for IE <9 - Lorenzo 2011年9月6日20:58

是。IE9也沒有WS。微軟有一些WS測試版,但僅適用於可以從JS訪問的Silverlight - 再次像Flash解決方法一樣。MS沒有關於WS支持的正式公告 - 他們在即將推出的標準和WebGL上玩遊戲。由你來考慮的事情;) - oberstet 2011年9月8日12:47

IE10附帶了對二進制WebSockets消息的支持:tavendo.de/autobahn/testsuite.html - oberstet 2011年9月16日12:14

如果您可以將WebSockets用於您的用例,那麼Autobahn非常好用。 - 凱文霍恩於2012年7月20日23:43

5楼
+10

My answer to this question provides an example of server push using the autobahn library which IMHO is so far the most user friendly WebSocket framework powered by Twisted. Also a JS implementation is available as well as Android.

Comet is fully replaced by WebSocket and you should consider using the latter unless you plan to support IE8 and older

6楼
0
7楼
0
12
votes
answers
23 views
+10

Are there any open source C#-based non-blocking, event-based web server like Tornado? [closed]

I want to build a comet-based application and would like it to be able to sustain up to 1000 concurrent connections. As I understand, Tornado has the advantage of not spawning one thread per request thus allowing it to handle thousands of long poll requests easily.

沙发
+80
+50

I think Manos de Mono is what you are looking for. It is still pretty early, but looks promising.

+30

To process long polling requests with ASP.NET / IIS you want to implement a custom HTTP handler and implement IHttpAsyncHandler. This allows you to begin processing the request, utilizing an ASP.NET worker thread, and then return the thread to the thread pool while waiting on an event to trigger a response.

http://msdn.microsoft.com/en-us/library/ms227433.aspx

Asynchronous HTTP handlers enable you to start an external process (such as a method call to a remote server) while the handler continues processing. The handler can continue without waiting for the external process to finish.

ASP.NET MVC also provides an AsyncController to simplify implementing asynchronous request processing within this framework.

http://msdn.microsoft.com/en-us/library/ee728598.aspx

+10

IS it http://webserver.codeplex.com/ , what you're looking for?

0

you can try Mongrel2 with dot net bindings. It is very fast language agnostic web server. It works via zeroMQ.

0

I'm working on a straight port of Tornado to C#. It's not 100% yet, but getting there.

https://github.com/swax/Tornado.Net

91
votes
answers
20 views
+10

using Flask and Tornado together?

I am a big fan of Flask - in part because it is simple and in part because has a lot of extensions. However, Flask is meant to be used in a WSGI environment, and WSGI is not a non-blocking, so (I believe) it doesn't scale as well as Tornado for certain kinds of applications.

Since each one has an URL dispatcher which will call a function, and both will use Python files (in Django you dont launch the python file but in flask or tornado you do) do does it make sense to have two seperate parts to your website - one part running the non-blocking jobs with Tornado, and the other part written with Flask?

If this is a good idea, how would you go about sharing cookies / sessions between Flask and Tornado? Will I run into issues, since Flask will use it own system and Tornado will use its own system?

up vote 87 down vote accepted favorite
沙发
+870
+50

i think i got 50% of the solution, the cookies are not tested yet, but now i can load Flask application using Tornado, and mixing Tornado + Flask together :)

first here is flasky.py the file where the flask application is:

from flask import Flask
app = Flask(__name__)

@app.route('/flask')
def hello_world():
  return 'This comes from Flask ^_^'

and then the cyclone.py the file which will load the flask application and the tornado server + a simple tornado application, hope there is no module called "cyclone" ^_^

from tornado.wsgi import WSGIContainer
from tornado.ioloop import IOLoop
from tornado.web import FallbackHandler, RequestHandler, Application
from flasky import app

class MainHandler(RequestHandler):
  def get(self):
    self.write("This message comes from Tornado ^_^")

tr = WSGIContainer(app)

application = Application([
(r"/tornado", MainHandler),
(r".*", FallbackHandler, dict(fallback=tr)),
])

if __name__ == "__main__":
  application.listen(8000)
  IOLoop.instance().start()

hope this will help someone that wants to mix them :)

如何在Tornado中添加異步方法?你能在燒瓶路線上使用async嗎? - Merlin 12年4月4日19:01

我知道Flask是一個微框架。但是Tornado並不是一個微框架,但它有一個強大的http服務器。假設您不需要關注WSGI“容器”的潛在交換,為什麼不開發Tornado提供的產品呢? - 傑森10月27日在18:40

Flask很好,因為它的擴展,所有東西都有Flask的擴展,所以不需要重新發明輪子。@Merlin我認為這不是一個簡單的方法,Flask使用WSGI並且WSGI不是異步的。 - Abdelouahab Pp 12年4月4日14:02

這真的可行嗎?你最終使用這個,還是只使用龍捲風? - Mittenchops 2014年4月7日20:08

@AbdelouahabPp,雖然Flask使用WSGI並且WSGI不是異步的,但是龍捲風可以接受異步連接然後我們每個請求都可以在不同的線程中運行(我不確定),然後我們可以讓異步龍捲風改為使用Gunicorn同步worker類就像Apache pre-fork模塊一樣。 - 安迪2015年10月15日3:48

+40

Based on 1 and 2, the combined and shorter answer is

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":

    from tornado.wsgi import WSGIContainer
    from tornado.httpserver import HTTPServer
    from tornado.ioloop import IOLoop

    http_server = HTTPServer(WSGIContainer(app))
    http_server.listen(8000)
    IOLoop.instance().start()

Please consider the warning about performance that has been mentioned on 2 , 3

最好單獨使用龍捲風而不是結合燒瓶和龍捲風。 - Ahmad Yoosofan 2017年3月25日15:25

62
votes
answers
20 views
+10

Is Tornado a replacement to Django or are they complementary to each other?

I have several questions about Tornado and other web frameworks.

1) Tornado claims to be a webserver (a non-blocking one, therefore much performant), so some people said it does not play the role of django --i.e., they say tornado is not a web framework.

However, it does provide a web framework I think (http://www.tornadoweb.org/documentation#main-modules) -- in this way, it seems to replace django as the web development framework.

Is my above understanding correct?

2) Normally, several Tornados are set up behind Nginx. Tomcat is also normally set up behind Apache web server. Can I say Tornado plays exactly same role of Tomcat does for Java web server? If the answer is yes, then Tornado IS a web framework.

3) I read some article saying using Tornado and Django together, such as http://www.jeremybowers.com/blog/post/3/on-deploying-tornado-web-server-framework/, but I read some article online claiming that "if you use Django, then you lose the asynchronous from Tornado", is this true or false? A related question though, if Tornado is itself a web framework as I said in 1), why people bother using Django at all? (to result the plugin?)

Can someone give me a 101 introduction?

up vote 35 down vote accepted favorite
沙发
+350
+50

To answer the question,

  • NO, Tornado is not a replacement to Django. It's an alternative.

  • YES, they are complementary to each other but not in the same process (*)

I would use Django when it's a big team effort and/or needs to run on a SQL database.

I would use Tornado for everything else. Ie. personal projects, WebSocket related apps, apps that use a NoSQL backend.

(*) don't bother running django inside tornado or the other way around unless you really have a strong requirement for that.

嗨!我有點晚了,但我想知道為什麼不打擾在龍捲風中運行django?如果我想使用龍捲風處理websocket請求並通過django的api訪問mysql數據庫怎麼辦?那會成為“在龍捲風中運行django”的一部分嗎?謝謝 - 山姆3月13日在0:42

個人項目為什麼?因為你想要學習它,它不是龍捲風超過django的有效理由 - Tolo Palmer 18年8月21日在9:40

+270
  1. Tornado is a web server and a web framework by most definitions, but it's quite a minimal framework (compared to Rails or Django). Tornado modules are loosely coupled, so it's possible to use just the web server component (or even just the lower level IO loop). Compared to Django, there are a lot of areas where Tornado doesn't have as much functionality. For example, there isn't really a model abstraction in Tornado, you have to roll your own.

  2. When you run a Tornado app behind Nginx, that's your app running – Nginx just proxies to it. I believe Tomcat is an application server, distinct from your application. I wouldn't call Tomcat a web framework.

  3. Django is not asynchronous, so generally your app will block while using the Django components. This may not be a big deal, it depends what you're doing. The Tornado devs have stated (paraphrasing heavily) that for most applications, the biggest win comes from not blocking while waiting for the client, i.e. web browser. Blocking on the database, for example, is not a big deal if you keep your queries fast.

There are a lot of pros and cons for both Django and Tornado, and there are many alternatives to both - it's definitely not just a choice between the two. Here's a very quick list of why you might want to use Django though:

Pros for Django:

  • it's a fuller stack (admin pages for example are very easy to implement)
  • it's much more established (plugins, tutorials, etc.)
  • it's better documented
  • its ORM is very nice

對我來說,一個大型的龍捲風扇,一個主要的加為Django的是它的ORM。如果您有SQL數據庫,請使用Django。 - Peter Bengtsson 2011年6月8日15:05

同意,我為此添加了一顆子彈。 - Cole Maclean 2011年6月8日20:54

你有一個很棒的ORM,你可以在任何python項目中使用它:SQLAlchemy。所以你不會錯過那個。龍捲風的最大缺點是對我缺乏會話,你必須自己實現它們(不是一項大任務,但最好有一個標準庫)。 - Florent 2014年1月20日1:43

@colemaclean,無法就您的評論達成一致“例如,如果您保持快速查詢,阻止數據庫並不是什麼大問題。” 你怎麼決定一個電話足夠快?您如何確保查詢將在每次通話時保持相同的響應時間?當你開發一個系統時,你如何確保它會在preasure下提供相同的性能? - cagatay 2014年11月8日8:25

@cagatay嗯,這些都是判決。你無法100%肯定這一點。但是,使db查詢異步並不會真正改變它。我將添加一個指向開發者評論的鏈接。 - Cole Maclean 2014年11月13日10:47

12
votes
answers
16 views
+10

Tornado is “a relatively simple, non-blocking web server framework written in Python”--can somewhat explain what that means?

This is probably a stupid question, but what exactly is a "non-blocking web server"? All web servers are technically non-blocking, arent they? otherwise how could they handle simultaneous connections? Apache2 achieves this using a combination of fork() and pthreads. How exactly are Tornado (and Twisted also) different? Do they just set a bunch of sockets to non-bocking mode, build an FD list (or equivalent), and then loop over that with one big select() sys call?

Where would you use a framework like these, and what advantages can they give you over Apache2 (or other popular servers)? Thanks

up vote 12 down vote accepted favorite
沙发
+120
+50

This article on EventMachine may also give you a hint:

Steeped in the tradition of forking / threaded web-servers I found myself rather surprised when I joined one of the research projects at University of Waterloo a couple of years back: we were benchmarking different web-server architectures, and top performers were all event-driven servers.

As I pestered everyone with questions, I quickly realized why - in an environment with hundreds of thousands requests a second, forking and context switching associated with thread management become prohibitively expensive (fork is worst performer, as it does a memory copy on the parent process every time). Whereas by comparison, a tight and highly optimized event-loop really shines when it comes to performance under heavy loads.

謝謝,我想知道一個事件循環select()/ epoll()體系結構是如此引人注目(我在TCP書中看到的是yeaaaars之前的事情),以及為什麼它可能比線程更好。 - - 09年9月14日凌晨4點45分

27
votes
answers
15 views
+10

what does @tornado.web.asynchronous decorator mean?

  1. If code didn't use this decorator, is it non-blocking?
  2. Why this name is asynchronous, it means add decorator let code asynchronous?
  3. Why @tornado.gen always use with @tornado.web.asynchronous together?
沙发
+220

@tornado.web.asynchronous prevents the the RequestHandler from automatically calling self.finish(). That's it; it just means Tornado will keep the connection open until you manually call self.finish().

  1. Code not using this decorator can block, or not. Using the decorator doesn't change that in any way.

  2. As @Steve Peak said, you use the decorator for asynchronous requests, e.g. database retrieval.

  3. Updated for Tornado 3.1+: If you use @gen.coroutine, you don't need to use @asynchronous as well. The older @gen.engine interface still requires @asynchronous, I believe.

龍捲風文檔的鏈接已被破壞。我猜它與tornadoweb.org/en/stable/gen.html類似? - Cuadue 2013年5月14日17:12

這是概述。現在修復,謝謝! - Cole Maclean 2013年5月21日12:17

看來,在你的GET / POST結束後(協同程序完成),當使用@ tornado.gen.coroutine作為裝飾器時,請求會自動完成。使用異步時,你必須調用self.finish() - cfy 2014年4月16日2:55

板凳
+50
  1. Answered here: asynchronous vs non-blocking

  2. Think of it like this. When you need to make a request to say a database or another url to retrieve data you do not want to block your tornado IO. So the @tornado.web.asynchronous will allow the IO to handle other requests while it waits for the content to load (ex. database or url).

  3. They are simular. You most likely will use @tornado.web.asynchronous.

“在這裡閱讀更多”是一個破碎的鏈接 - 馬修詹姆斯戴維斯2016年2月13日在3:22

地板
0

@tornado.web.asynchronous is essentially a just a marker you put on a handler method like get() or post() that tells the framework that it shouldn't call finish() automatically when the method returns, because it contains code that is going to set up finish() to be called at a later time.

125
votes
answers
13 views
+10

Differences between node.js and Tornado [closed]

Besides the fact that node.js is written in JS and Tornado in Python, what are some of the differences between the two? They're both non-blocking asynchronous web servers, right? Why choose one over the other besides the language?

up vote 96 down vote accepted favorite
沙发
+960
+50

The main advantage of node.js is that all its libraries are async so you don't have to worry much about blocking. There are async libraries for mysql, postgres, redis, etc. All is async by default.

Python have a library for anything - but most of these libraries are not asynchronous. In order to take advantage of tornado (and not to block the process) special libraries for are necessary (e.g. you can't just 'pip install redis' and use it, you'll need something like brukva), and there are much less tornado libraries than node.js libraries. There is no async mysql tornado driver available at the moment, for example (or at least I'm not aware of it).

But you can still use many python libraries with tornado (ones that doesn't do i/o), and tornado community is raising and filling the gaps.

It is easier to write an app using node.js than using tornado in my experience. I personally switched to tornado from node.js because it fits into existing infrastructure of my python project better (integration between django site serving html pages and tornado server providing realtime features was quite painless).

Mikhail,你對JavaScript中缺乏對生成器的支持是不正確的。請參閱JavaScript 1.7中有關生成器實現的信息(並註意當前版本,1.8.2,來自2009年中):JavaScript 1.7中的新增功能:生成器。 - Tadeck 12年3月19日15:40

語言node.js在非Javascript 1.7或1.8中使用,它更接近ECMAScript5。這是因為node.js使用的V8引擎並未實現所有JavaScript 1.7功能(請參閱code.google.com/p/v8/issues/detail?id=890)。這可能會在未來發生變化,並且可能有正當理由(例如JS 1.7不是標準),但是JavaScript 1.7是在2006年引入的,而'yield'在2012年不是第8版。 - Mikhail Korobov 12年3月19日在19:07

你是對的,我以某種方式解釋你的評論,好像你說JavaScript沒有生成器。我的錯。 - Tadeck 12年3月19日19:14

這個答案在2年後更新了嗎? - nkint 2014年5月27日10:18

+130

As Rich Bradshaw points out Node.js is written in JS, which means you can keep the front end and the back end in the same language and possibly share some codebase. To me that is a huge potential benefit of Node.js. Node also comes with more asynchronous libraries out of the box it seems.

V8 should make JS faster than Python at least that's what benchmarks seem to suggest, but it may not matter much, because both Node.js and Tornado (and most other web frameworks for that matter) use wrappers for native libraries. A lot of the Python standard library is written in C or can be replaced by a faster alternative, which mitigates potential differences even more.

Web services are usually I/O bound, so that means we're spending the time waiting for the data store and not processing the data. That makes the synthetic speed difference between JS and Python irrelevant in many applications.

非常正確的觀點 - 安全曲線於2013年5月17日2:16

+100

node.js uses V8 which compiles into assembly code, tornado doesn't do that yet.

Other than that (which doesn't actually seem to make much difference to the speed), it's the ecosystem. Do you prefer the event model of JS, or the way Python works? Are you happier using Python or JS libraries?

看看Pypy - Dmytro Leonenko 2012年2月14日9:39

我只是對簡單的單進程helloworld應用程序運行httperf。PyPy 1.8上的龍捲風(~8k req / s)與Node的性能(~11k req / s)相差不遠。 - jholster 12年3月6日16:58

V8編譯為機器代碼,而不是彙編。並且重要的是編譯是及時的而不是靜態的:en.wikipedia.org/wiki/V8_(JavaScript_engine) - Max Heiber 2015年10月21日1:39

+30

Nodejs also has a seamless integration / implementation of websockets called Socket.io. It handles browsers supporting sockets - events and also has backward polling compatibility for older browsers. It is quite quick on development requiring a notification framework or some similar event based programming.

Python也有socket.io - 12月7日12:46 jdi

好吧有socketTornad,它是socket.io的分叉實現,它僅取決於下一次更新在支持方面的時間。這裡提到這一點的全部意義在於nodejs中socket.io的優點,它減少了處理很多場景。 - Sushant Khurana 12年7月7日7:10

不知道你在說什麼。那個項目已經過時了。Tornadio保持更新socket.io參考的版本:github.com/MrJoes/tornadio2 - jdi 12年7月7日在16:05

+30

I would suggested you go with NodeJS, if there is no personal pref to python. I like Python a lot, but for async I choose Tornado over node, and later had to struggle finding way to do a thing, or libraries with async support (like Cassandra has async in tests, but nowhere could I find way to use cqlengine with async. Had to choose Mongo since I already surpassed the deadline). In terms of performance and async, Node far better than tornado.