Just a note on another simple solution:
I've been quite happy using msgpack (very fast and lightweight serialization format) with zeroMQ or just posix pipes. The code with pipes expects you to use a scheduler which can react to file descriptors (select):
Simple Msgpack bindings (should be trivial to adapt) :
Fifo template (pipe):
Fifo usage example (midi receive) :
The overhead is really reduced to the bare minimum for a network friendly/no sharing solution.
When using zeroMQ, I simply send msgpack data as chars.