Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So my first thought on this Tornado stuff was: why not glue twisted and tornado together? A quick look at the code suggests it is doable, and could help fix the "web mess" in twisted.

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.



what 'web mess in twisted' are you referring to?


There are two web implementations, and neither are complete(eg, twisted.web does not support even http 1.1). Even the twisted developers will tell you they are not happy with the web code in twisted. twisted.web2 was the future and twisted.web was to be depreciated, now twisted.web is the future and twisted.web2 is to be depreciated... the mess is still being cleaned up.

Link to the twisted web page describing the situation and the plan: http://twistedmatrix.com/trac/wiki/TwistedWebPlan


that's just not true. i use web1 extensively, and it works very well, and although it's performance is not as good as apache or lighttpd when serving raw files, it's more than adequate for most web application development.

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.


Specifically, from the outside looking in, exactly what you described is(was?) a mess. Last I looked it was confusing as to what I should use, what would be supported in the future, who (web or web2) had what feature, and what even worked. That was quite a while a go (like over a year). More recently, talk at pycon suggested things had not improved much, but I haven't verified that. I am open to the possibility that things have improved since I last looked, particularly given the overall quality of twisted stuff.

I still wonder tho, if this would be good to graft into twisted?


there is one implementation of twisted.web... twisted.web2 is merged, and what is not in twisted.web and is in twisted.web2 will not be used or will be merged in the future, there is no mess, you should just use twisted.web.


As someone who tried using twisted.web just a few days ago I can add that yes, twisted.web seems reasonably complete but no, it is not a reasonable choice at this point for many reasons (mostly the common twisted reasons: callback hell and insufficient documentation).

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: