I'm looking for a very simple way to allow RPC between Java and C++ applications.
My system contains several Java modules and one C++ module. I have not too much different procedures to call (about 2-3 per module), and they will not change much (except some minor adaptations like adding a new procedure or changing one's prototype). I am writing all the modules so I can use whatever I want. Also, the modules are to be all executed on the same machine, except for one, but the possibility of executing some of them on another machine without to much harass (basically, just changing a configuration file) would be a plus.
All the modules, the machines and the networks used for this application are trusted but I don't want any security flaw on the RPC protocol and I want a minimal performance overhead, so the simpliest the RPC protocol is, the better. Also, each method called has one prototype only.
At the moment I'm trying to use RPC through TCP sockets, as I don't want to use RMI nor Unix primitives (no standard implementation on Java and no network capabilities). I have written a very simple RPC protocol: through a TCP frame you give the serialized name of the method called, followed by the serialized list of arguments. On the server side, it listens on an object and uses reflection to execute the method given. In case of error, the returned object is a DistantRPCError encapsulating the error.
The code is very simple (only about 100 loc) and can be used in a large variety of situations (I work with Streams, so I'm not even depending on Sockets). The problem I am facing is that I can not test my code statically (The simple initialization of a local test is longer than the tested code) and I can not really see how hard this would be to implement it in C++ (using JNI for serialization, I suppose).
So my question is: do you know of a different way of making RPC calls in both Java and C++ that is really simple (so no RMI) and can be trusted (I'm not looking for a shinny piece of technology, I want something standard and industry-proofed). Also, I have some limitations on the performances (the machine is a low-cost computer and I have a lot of cryptology to do locally). And as I said, the majority of the modules (except for one or two) are executed locally, so I'm also interested in IPC mechanisms (even if it would be nice to have only one RPC mechanism for all my modules).
I can give you my actual RPC code if you want, but as I said it is not even tested, so I am not sure it works at all.
Edit: I will probably use SOAP, as I don't see much interest in using an ORB for my specific problem. Thanks for the idea !