The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Which IPC add-on module for Python

I need to be able to use some kind of inter-process (not threads in the same process) locking, like a semaphore or mutex.

I'm wondering which package to use, and, perhaps more importantly, which to avoid.

Right now this is for 2.4.3 but an update to 2.5 is certainly possible.
frustrated
Tuesday, November 13, 2007
 
 
Which OS or OSes[0] do you want to support?

-Chris

[0] I never remember the rules for plurals and apostrophes when the word ends in 's'.
Chris Tavares Send private email
Wednesday, November 14, 2007
 
 
Python cookbook http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=Threads  is always a good place to start.
Martin Send private email
Wednesday, November 14, 2007
 
 
@Chris - Linux variants - probably Red Hat and Debian

@Martin - this isn't a threading problem - this is for multiple processes, so real IPC is required.

Wednesday, November 14, 2007
 
 
@Chris,

Linux - most likely Red Hat but that probably doesn't matter in this case.

@Martin,

This is interprocess, not interthread, so those recipes don't seem to hit the spot.
frustrated
Wednesday, November 14, 2007
 
 
The thread section also covers some IPC but there is also a section on ditributed apps.
http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=Distributed

If you are on unix you have aquite a few options.
Mailslots, named pipes, sockets. Basically anything in the unix API is covered in python.
Martin Send private email
Wednesday, November 14, 2007
 
 
There are a variety of solutions.
I think you should refine your requirement first.

Are these going to be persistent, one-to-one connections?

Are they more like client-server where one side is persistent but the other changes?

Will both sides come-and-go? (i.e. peer-to-peer)?

Are they on the same machine? (could you use shared memory?)

How much traffic? (a few msgs per/day, a few/second, 1000s/sec)?
dbs Send private email
Monday, November 19, 2007
 
 
Doesn't Python have support for SOAP, RPC and the like?
Dotimus Send private email
Wednesday, November 21, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz