[Twisted-Python] twistd question
ross at sourcelabs.com
Tue Jan 24 15:15:05 EST 2006
I forgot to mention one other item. The worker subprocesses are not involved
in generating a network reponse to the request. Basically, the request sent
to the main service process is, "Please do this at your earliest
convenience", the request is validated and the server response with "okay,"
then launches the subprocess.
Ross Jekel writes:
> Hello, I have a small design problem I'm trying to get my head around
> regarding twistd with respect to lauching worker subprocesses.
> I have a requirement for every process on my server to be able to
> communicate to an existing message queuing system. The interface to this
> message queuing system requires that all processes be a "server" so that
> they can receive async messages. I have that all working fine and have the
> interface to the external system wrapped up in a nice service, as it us
> helpful to get the startService and stopService calls for properly
> initializing and shutting down the session to the message queuing system.
> As I have a mixture of a few long running requests and many short running
> requests that could be sent to the main server process, I would like to
> design my main service such that it can handle the short requests directly
> and spawn other subprocessing to handle the long-running requests.
> Since each of those subprocessing needs to be connected to the message
> queue, I'd like to use twistd to run them and benefit from the application
> level abstractions for setting up the service. But I'm not entirely sure
> how to use twistd property when I may have multiple instances of the same
> .tac file running. Basically, I need to spawn worker subprocessing that
> during the time they are doing work are services so that they can
> communicate with the messaging subsystem.
> Does this make sense? Any thoughts on how it can be accomplished?
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python