[Twisted-Python] Use of twisted as web app core

Ben.Young at risk.sungard.com Ben.Young at risk.sungard.com
Fri Feb 11 06:35:48 MST 2005


Hi there,

I am trying to evaluate the possible use of twisted as the event framework 

around which my web app will hang. 

I would like my app to be run under mod_fastcgi as I like the process 
control this brings as well as the automatic load balancing across 
processes. I would also like to use the spread communication toolkit (not 
twisted spread) to act as a control console to be able to send messages 
such as "flush cache" to all active processes, even if they are on 
multiple machines.

This asynchronous requirement seems ideal for twisted as both of these 
mechanisms use sockets or file descriptors for communication. The 
questions I have are:

fastcgi communicates by using the stdio stream as a socket. Is there a way 

in twisted of treating a fd number as is it were a socket?

Has anyone written a fastcgi protocol object? I have looked at the fcgi.py 

(http://alldunn.com/python/fcgi.py) project and it seems like the project 
should be relatively easy to port.

Has anyone used spread with twisted? I think you can use select to see if 
there is a message waiting, but then you have to use the spread api to 
actually access the message.

Is twisted the way to go or should I use the simpler code of asyncore 
(although I have heard bad things about that)

Cheers,
Ben






More information about the Twisted-Python mailing list