I have taken a look at embedding and Swig.

Hmm... I'm very unsure about them.

Swig seems to assume that you want to take away the main() method and
treat the C++ code as a shared library. It's not really the same as
interprocess communication.

The embedding solution also provides one way interaction. The C++
program calls ruby, but not the other way around. There might be ways
around this, using callbacks or so. I'd like to learn more...

I suspect that IPC using XmlRpc is the most powerful solution (and easy
to implement).

I am eager to learn your (anyone's) insights.