In terms of speed, pipes are the best cross-platform IPC engine. This assumes, however, that you want cross-platform IPC on the same computer. If you want to be able to talk to processes on remote computers, you'll want to look at using sockets instead. Fortunately, if you are talking about TCP, at least sockets and pipes behave about the same. Although the APIs are different for configuring and connecting to them, they both act as data streams.
However, the hard part is not the communication channel, but the messages you send. You really want to look at something that will perform validation and parsing for you. I recommend looking at Protocol Buffers . You basically create a specification file that describes the object that you want to pass between processes, and there is a compiler that generates code in several different languages ββfor reading and writing objects that meet the specification. This is much simpler (and less error prone) than trying to come up with a messaging protocol and parser.
Douglas Mayle Sep 15 '08 at 19:22 2008-09-15 19:22
source share