parallel and/or synchronous start/run/stop on multiple boxes

Ned Deily nad at acm.org
Thu Jan 8 00:44:58 EST 2009


In article 
<e1a84d570901072117n28570f57ld967e85f074381a3 at mail.gmail.com>,
 "James Mills" <prologic at shortcircuit.net.au> wrote:

> On Thu, Jan 8, 2009 at 3:08 PM, Shane <gshanemiller at verizon.net> wrote:
> > Consider a network of 3 fully-connected boxes i.e. every box as a TCP-
> > IP connection to every other box.
> >
> > Suppose you start a python program P on box A. Is there a Python
> > mechanism for P to send a copy of itself to box B or C then start that
> > program P on B or C by running a method p in P? Is there a way that P
> > on A could wait for that result?
> 
> No, python provides no such mechanism.

The multiprocessing module, new in the 2.6 standard library and 
available in PyPi as a backport to 2.4 and 2.5, supports managing of 
processes on both local and remote machines.  The 2.6 module 
documentation has an "example/demo of how to use the 
managers.SyncManager, Process and others to build a system which can 
distribute processes and work via a distributed queue to a 'cluster' of 
machines on a network, accessible via SSH".

<http://docs.python.org/library/multiprocessing.html>

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list