I’m searching for a light-weight, fast and easy way to handle Inter Process Communication between some programs on a Linux machine.
Currently, I’m thinking Named Pipe, because it’s provided by the OS itself. Are there any caveats about the performance or usability?
Would Shared Memory be better?
I don’t think I need a super-complex Framework.
Please point me in the right direction, thanks!
Update:
I want to build a small program (daemon) that tells other programs (which it itself starts) to pause, report their status back, stop etc.
So the other program should be notified that a new command is waiting for it. A pipe is not ideal for that, is it?
Boost has a nice InterProcess library that is cross-platform and quite intuitive.
I have only toyed with it though, so there might be better alternatives out there.
However, if you don’t really need shared memory, I would stick with a messaging approach. You’ll avoid deadlocks and race conditions. The pipe principle is really great, and it even allows for lazy behaviors which may save you a lot of processing depending on the matter at hand!