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.

Best IPC solution for crossplatform Client/Server app

What is the best way to implement interprocess communication (IPC) in a client/server app that needs to run on several platforms (the communication is only between processes on the same machine)?

On unix the obvious solution would be unix domain sockets, but on windows we only have internet sockets which are too insecure (and often get in trouble with firewalls, even in local use).

Sockets also have some speed issues, so maybe shared memory should be considered? Except it may not be supported on all platforms.
John Shapiro
Friday, July 29, 2005
 
 
ACE
B
Friday, July 29, 2005
 
 
If you've got some money to throw at the problem, check out Tibco's SmartSockets.  I've used it in the past and it's great.

If you're rolling your own, I'd see if you can use XMLRPC or SOAP.  They're standard and most popular languages have at least one good library for dealing with them.  They're very well supported in scripting languages which makes it easy to write unit tests for your software.  I've been quite happy using SOAP for the current client/server software I'm writing using Python and the Twisted framework.
Jon B Send private email
Friday, July 29, 2005
 
 
I just learned about this today but it looks pretty useful -- cross-platform (downloads for: win32, linux, osx, hpux, aix, solaris...), cross-language (c++, c#, php, python, java).

ICE: Internet Communications Engine
http://www.zeroc.com/ice.html
Chris Winters Send private email
Friday, July 29, 2005
 
 
You have shared memory, message queues, semphores (of many kinds).

Write your own IPC abstraction layer and implement it specifically for each platform (you'll find differences between UNIX flavors and versions).
Dino Send private email
Friday, July 29, 2005
 
 
Are you kidding me ? the man needs efficient IPC between processes running on the same machine! what's SOAP got to do with this? Remember with soap every data structure is converted to a verbose XML document. You waste valuable computing resources to encode your data structure on one side, you waste valuable IPC bandwidth to transfer it to the other process and you spend valuable computing resources in the destination process decoding your verbose document. This waste of resources apart, what's the logic behind this? You need to transfer data structures between processes ON THE SAME machine. This means same byte ordering, same number formats, same everything. So you can transfer your data structure in native format, why would you bother to encode it in something inefficient and then decode it back again to obtain exactly the same thing?

John, I'd follow Dino's advice. Define an interface, implement it for different OSs and link against one implementation or the other when you build your binaries for different platform. This of course if someone didn't already implement a free portable solution. If you can afford it you can also go for a commercial solution.

Regards,
Emil.

P.S. this goes well with my rant: http://www.artima.com/forums/flat.jsp?forum=106&thread=4846
Emil Kirschner
Friday, July 29, 2005
 
 

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

Other recent topics Other recent topics
 
Powered by FogBugz