[Twisted-web] Twisted and WSGI...

L. Daniel Burr ldanielburr at mac.com
Wed Apr 5 12:48:23 CDT 2006


On Wed, 05 Apr 2006 14:27:30 -0400, m h <sesquile at gmail.com> wrote:

> Hi Folks-
>
> I'm new to this list.  (Am beginning to think more about learning
> twisted... for the third time ;) ).  I've got a question for you all
> and hope that you don't take it the wrong way.  It's not meant to be
> flame bait.
>
> As WSGI is going into python 2.5, I was wondering what the general
> consensus is among twisted web devs about it?  Does the WSGI model map
> well into twisted's asynchronous model?  Does twisted already have
> everything it needs, so WSGI doesn't bring much to the table?

In my opinion, no.  WSGI doesn't deal with the asynchronous model at
all.  The original author, Phillip Eby, noted that every time he tried
to figure out what async WSGI would look like, he ended up with something
like twisted or PEAK anyway.

In general, WSGI seems to have caught on with people who like threaded
servers.  I honestly see zero value in it if you are going to use an
integration toolkit like twisted.

> It appears that as AJAX becomes more popular then the asynchronous
> model might scale better with many small requests.  Say I have a WSGI
> app and I want to port it to twisted.  How easy is that?  (I know
> there is a twisted wsgi module)  Do I just need to wrap some logic in
> deferreds?
>

If you want to do AJAX-y things, then you want Athena, which runs on
twisted, and does even more than run-of-the-mill AJAX.  Google for
"comet" and you'll get an idea of the 2-way web functionality that
Athena can provide.

> Are any twisted people using WSGI?

Lord, I hope not.  The Zope 3 team runs their app-server on top of
twisted via WSGI, but they are the only ones I know of.

> Again, I'm just interested in hearing your constructive thoughts.
> Google didn't turn up much on the subject.
>
> thanks,
>
> -matt

Hope this helps,

Daniel



More information about the Twisted-web mailing list