[Twisted-web] Re: Web2: What is to be Done

Nicola Larosa nico at tekNico.net
Wed Sep 13 12:33:59 CDT 2006

glyph at divmod.com wrote:
> Itamar and I have just created a few new tickets and the 
> "Web2-Gold-Master" milestone for the ascension of web2 to the status of 
> The Web Server For Twisted.
> ...
> In particular, this is a favorite topic of discussion for pundits.  I 
> have heard many times that our web server situation is why Twisted is 
> not as popular as Linux, or Quake, or Ruby on Rails, or MVS, or BitchX, 
> or whatever today's infrastructure flavor of the month is.

Linux? Quake? MVS? BitchX? I thought this was about web. ;-)

The web server is just a part, the matter is usually about web
*frameworks*; if you want to compare something to RoR and others, that
should be Nevow, not twisted.web2 .

twisted.web(2) is a great web server that works well (albeit in a threaded
environment) with most Python web frameworks, being complementary to them.

I think the main reason Twisted is not popular as other Python web
technologies is its event-based structure. As soon as one tries to
interface other libraries with Twisted, one either uses threads, or wraps
the library's API with Deferreds.

The first solution is suboptimal for Twisted; the second is incompatible
with already existing code that uses that library. This makes Twisted
basically incompatible with all the code not written for it, if one wants
to fully embrace its concurrency model.

This kind of mismatch does not seem something that can be "fixed". I would
however be very glad to be corrected, on this point. :-)

Nicola Larosa - http://www.tekNico.net/

I think the first I ever heard that user session state was "bad" was
from REST proponents, and that was fairly recently. As REST becomes
better and more widely understood, I believe people are starting
to think differently about how to architect a web application.
I certainly am. -- Bill Venners, April 2006

More information about the Twisted-web mailing list