To be clear, I need sub-processes that are independent of thrift.

My solution was to use the threaded server and just monitor each sub-processes 
in a separate thread.  Each thread is then free to block on sub-process IO.

-Dan


From: [email protected] [mailto:[email protected]] On Behalf Of Dvir Volk
Sent: Monday, February 27, 2012 6:30 AM
To: [email protected]; Christian, Daniel
Subject: Re: How to have a server manage sub-processes?

Hi Dan, I don't know if it's still relevant after all this time, but thrift for 
python has 2 options to handle your needs (sort of).
There are 2 server classes you can use - TForkingServer that can fork a sub 
process for each new request, or TProcessPoolServer that spawns a pool of 
"worker" processes that accept requests from the same port (but can't directly 
share state).


On Fri, Jan 27, 2012 at 11:11 PM, Christian, Daniel 
<[email protected]<mailto:[email protected]>> wrote:
My server process needs to spawn some sub processes and interact with them 
occasionally over stdin/stdout (and notice if they die).

What's the  best way to do that with thrift?

My server is in python on Linux.  I'm using thrift 0.8.

Thanks,
-Dan



--
Dvir Volk
System Architect, The Everything Project (formerly DoAT)
http://everything.me

Reply via email to