Thrift is about two things: * Easily seralizable data objects (there are many uses for that alone) * RPC using those data objects
so its job is to let your clients talk to your server and vice versa. But how your server spawns and manages subprocesses or threads is not part of thrift. The threaded server allows for a server thread per transaction, but once again if the server thread wants to spawn subthreads or subprocesses that is done independently of Thrift. I think the short answer to your question "What's the best way to do that with Thrift?" is that you don't do that with Thrift. I don't feel like I'm helping you particularly well here, it may be that I don't really understand your question. - Rush On Jan 30, 2012, at 7:46 AM, Christian, Daniel wrote: > I didn't see any supported way to add my file descriptors to thrift, get > thrift to (non-destructively) timeout from read, or export thrift file > descriptors to an external select/poll (the latter seems possible, it just > doesn't look "supported"). > > Am I missing something? I'm new to thrift, so I'm still learning about it. > > -Dan > > -----Original Message----- > From: Rush Manbert [mailto:[email protected]] > Sent: Saturday, January 28, 2012 11:06 AM > To: [email protected] > Subject: Re: How to have a server manage sub-processes? > > Hi Dan, > > Unless I have missed something since we froze the Thrift version we use, this > really has nothing to do with Thrift. Thrift uses posix to implement its > internal scheduler, but you are not limited by that at all. (You certainly > don't need to use the Thrift scheduler.) We use boost threads in our code. > > - Rush > > On Jan 27, 2012, at 1:11 PM, Christian, Daniel 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
