Re: [Twisted-Python] Using reactor with multiple processes

2009-09-18 Thread David Ripton
On 2009.09.18 12:01:11 -0500, David Yoakley wrote: > Instead, we implemented a simple framework using twisted > PerspectiveBroker (pb) where we spawn processes with python > subprocess.Popen and use PB remote calls to manage the processes. Its > now working well and is very simple. Sounds great.

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-18 Thread David Yoakley
I promised a follow-up on what we found so here it is. As Phil indicated prior and is now clear to us, twisted is not designed to be fork safe. But as I considered patching it to set up all state when the reactor is started then I began to worry about whether I was really going to be happy with u

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-17 Thread Phil Mayers
James Y Knight wrote: > On Sep 16, 2009, at 12:33 PM, David Yoakley wrote: >> Thanks Phil for the reference to ampoule. We will look at that >> next. We are still hoping to get the parent set up in such a way >> that whatever the forking :-) shared state is, it does not get >> established

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread James Y Knight
On Sep 16, 2009, at 12:33 PM, David Yoakley wrote: > Thanks Phil for the reference to ampoule. We will look at that > next. We are still hoping to get the parent set up in such a way > that whatever the forking :-) shared state is, it does not get > established until after the children are

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread David Yoakley
Dimitri Vorona wrote: > Hi, > > i'd like to be able to start additional instances of my server using > multiprocess module. To do it i just start a new Process with > mutiprocessing and then create a new instance of my Application there. > Everything works fine, but i can't figure out a way to > st

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread Phil Mayers
Dimitri Vorona wrote: > Hi, > > i'd like to be able to start additional instances of my server using > multiprocess module. To do it i just start a new Process with > mutiprocessing and then create a new instance of my Application there. > Everything works fine, but i can't figure out a way to > s

[Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread Dimitri Vorona
Hi, i'd like to be able to start additional instances of my server using multiprocess module. To do it i just start a new Process with mutiprocessing and then create a new instance of my Application there. Everything works fine, but i can't figure out a way to stop such a process. If I run reactor