Inter-process communication options

Ben Darnell bgdarnel at my-deja.com
Thu Dec 2 19:36:01 EST 1999


I'm writing an app, using wxPython and Pyrite, which can synchronize
with a corresponding PalmOS application.  The problem is that if the
user tries to synchronize while the GUI is open and the user has made
changes which are not yet committed to disk, these changes will not be
reflected on the Palm, and the Palm's changes will not be reflected in
the GUI.  The sync and GUI processes need to talk to each other somehow.
I'm looking for some way to do this that is cross-platform (specifically
Windows and Unix at a minimum).  Here are some things I've thought of:

* Send a message to the GUI process and have it do the synchronization.
I'm not sure how well this would work, since it seems it would have to
make a copy of the Pyrite object in the other process.  There are
several ways this could be implemented, with varying degrees of
portability (fifos, sockets,...)

* Send messages to the GUI process, telling it to commit its changes to
disk before the sync, and to reload the data from disk afterwards.  This
is probably the simplest thing to implement, but it's rather
inefficient, since it forces an additional load/save cycle.  

* Use some sort of distributed object system (e.g. CORBA, COM) to let
both processes access the same in-memory data.  This is probably the
'cleanest' solution from a theoretical standpoint.  This imposes an
additional software requirement on the user besides Python and wxPython
(Pyrite is optional), which I would like to avoid but it is not a
showstopper.  ILU appears to be cross-platform; are there any other
cross-platform ORBs?

* Anything else I may have overlooked?

Thanks,
-Ben

-- 
Ben Darnell              bgdarnel at unity.nc su.edu
http://thoughtstream.org





More information about the Python-list mailing list