simple and fast platform independent IPC

News123 news123 at free.fr
Wed Feb 3 03:32:58 EST 2010


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



More information about the Python-list mailing list