I am interested in a c++ linux-only (possible relaxed to posix-only) IPC solution that would behave as follows; a program called ‘calculator’ is started, and can listen to messages. Calculator would have a loop that periodically checks for message strings and then acts on the based on their content.
Another program called ‘send_msg’ can send messages to its pid (ideally a hostname/pid, through tcp or udp).
$ calculator &
// awhile later
$ send_msg <calculator pid> show calculations
Calc1: 52% complete
Calc2: 21% complete
$ send_msg <calculator pid> alter Calc2 <numeric parameters>
Ok! I'm restarting my calculations!
$
I am very versed in c++, but know nothing about network programming and am not interested in spending much time right now to learn it. Is there an easy-to-use c++ package that does the above? I would rather not have to choose things like port numbers, file locations, etc.
I think you may like zeromq (spelled 0mq), or the forked crossroadsio, as they abstract away a lot of the handholding allowing you simply pub/sub, as well as many other patterns. 0mq has (had?) a bunch of examples starting with simple ping-pong.