thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dvir Volk <d...@doat.com>
Subject Re: How to have a server manage sub-processes?
Date Tue, 28 Feb 2012 09:45:32 GMT
makes sense. you might want to use the non blocking server in this
situation, to save on threads and allow for more concurrency, but the
principal remains the same.
in my case I've designed my app and its sub processes around thrift, so it
simplified things, apart from sharing state between them, which is an
independent problem.

On Mon, Feb 27, 2012 at 9:25 PM, Christian, Daniel <
Daniel.Christian@honeywell.com> wrote:

>  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:* dvirsky@gmail.com [mailto:dvirsky@gmail.com] *On Behalf Of *Dvir
> Volk
> *Sent:* Monday, February 27, 2012 6:30 AM
> *To:* user@thrift.apache.org; 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 <
> Daniel.Christian@honeywell.com> 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****
>
> ** **
>



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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message