Twisted.web vs Tornado, a Performance test
apparatusproject.org
apparatusproject.org
My second thought was: Why didn't they build this on libevent, and pyevent, which has a built-in non-blocking webserver which is pretty darned fast.
Link to the twisted web page describing the situation and the plan: http://twistedmatrix.com/trac/wiki/TwistedWebPlan
Imho the most interesting part about Tornado is not Tornado itself but the question it rubs into the face of the twisted evangelists: "Why didn't they just use the real twisted instead of re-inventing it?".
This post suggests that they have at least heard the question and, ofcourse, immediately snapped into their long-practiced denial position ("Thou shalt not question the twisted way, we haz performance!").
Only this time twisted does not outperform the newcomer, which should give them food for thought.
web2 was never a formally released product, and most of the stuff that was only available in web2 (such as wsgi support) have now been backported. there was some confusion about this for awhile, but that was only ever a community issue, not a code-related one.
i primarily took issue with you calling it a "mess", i still think that's a rather inaccurate statement.
I still wonder tho, if this would be good to graft into twisted?
While Twisted is powerful (and as the poster said, in the same magnitude of performance), it has a tough learning curve.
Even if Tornado isn't successful, I think it just pushed the bar on how an async web framework can be written. I look forward to seeing other frameworks evolve as a response (I'm looking at you sinatra!).
The whole tornado vs. twisted thing is unfortunate, though. It exists in its current state because tornado is two different things: 1) a web framework 2) an async network stack.
#2 exists in core python and in twisted. If we transplant #1 to twisted, then it should be just as easy to develop web apps on twisted, except you get a whole lot of stuff for free.
That would be... beyond awesome.
http://github.com/dustin/tornado
I'd love some help, of course. :)
I'm not deep enough in twisted myself to contribute but I see others have already joined in - awesome!
As Tornado has no unit tests, it's difficult to see what's right or wrong without a human actually doing the work.
That said, performance testing Python web server implementations seems bit like racing snails. If speed is why you're using Python, you're probably using the wrong tool.