Re: Use of multiprocessing in Pyro

Irmen de Jong <[email protected]> Sun, 08 Dec 2013 11:56:22 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 4-12-2013 14:40, Dick Kniep wrote:
> Hi list,
> 
> We are running a system that has been built in the last decade. I want to implement a
> daemon that acts as middleware and stores the state of each logged on user.
> 
> The businesslogic that has been built is NOT threadsafe. But I really need the daemon
> to be multithreaded. So I thought about multiprocessing where the memory is
> separated.
> 
> What I am thinking about is to run Pyro in multiplexed mode and when a user logs on
> build the session in a multiprocessing way. Then when the session has been started,
> any subsequent request must be channeled to the correct process, but should satisfy
> my needs.
> 
> Is this a viable path?

Perhaps, I've never used Pyro in combination with multiprocessing. Give it a try!

But personally I would rather use Pyro in a regular fashion and put some form of thread
safe layer between your business logic and Pyro's server objects. For instance a
thread-synchronisation mechanism based on queue.

Irmen

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk