simple and fast platform independent IPC

bobicanprogram icanbob at gmail.com
Wed Feb 3 20:40:00 EST 2010


On Feb 3, 3:32 am, News123 <news... at free.fr> wrote:
> Hi,
>
> I wondered what IPC library might be best simplest for following task?
>
> I'm having a few python scripts all running on the same host (linux or
> win), which are started manually in random order. (no common parent process)
> Each process might be identified by an integer (1,2,3) or by a symbolic
> name ( 'dad' , 'mom' , 'dog' )
>
> these scripts want to send short messages to each other ( mostly
> integers, max a few bytes, short string), which would be enqueued in
> message queues of the receiving process.
>
> example:
>
> 'dad' wants to tell 'mom': 'cook'
> 'dog' wants to tell 'dad' : 'feedme'
> 'mom' wants to tell 'dad' : 'cookyourself'
>
> the receiver dos not necesarily have to know who sent the message
>
> a message shall be dropped silently if the receiving process is not running
>
> a message shall be reliably delivered if the receiving process is up
>
> xmlrpc seems to be a little heavy for such tasks.
>
> signals don't allow to exchange data
>
> a shared memory message queue would probably a good solution, but
> python's Multiprocessing.Queue  seems to require a common parent process
>
> thanks a lot for any ideas / suggestions
>
> N
>
> N


Have a look at the SIMPL toolkit (http://www.icanprogram.com/simpl or
http://www.icanprogram.com/06py/main.html).   It should do everything
you describe at least on the Linux end of the spectrum.   Under the
hood SIMPL uses a shared memory scheme for local message exchange.
SIMPL would be especially effective if you want to move your modules
at some future point onto different nodes.   SIMPL-Python can work
seamlessly on heterogeneous networks provided at least one node is
Linux.

bob



More information about the Python-list mailing list