I notice this thread: Fastish Python/Jython IPC, and I have a similar problem, but in different language.
I have a Java front-end and a C++ back-end, which I am thinking about rewrite it in Python in some near future. What will be the best IPC? I prefer socket to HTTP, as I am trying to avoid the HTTP overhead. And XML-RPC is an example one to avoid!
Are there any library to deal with cross platform RPC (JSON/XML etc.)?
Newbie in this field, thanks ahead!
-
to answer the question "Are there any library to deal with cross platform RPC (JSON/XML etc.)?" yes XML-RPC is a good choice. SOAP should be avoided but XML-RPC is pretty lightweight.user177800– user1778002010年03月03日 17:52:31 +00:00Commented Mar 3, 2010 at 17:52
-
Why do you limit solutions by not including XML-RPC?Barry Wark– Barry Wark2010年03月03日 19:14:27 +00:00Commented Mar 3, 2010 at 19:14
1 Answer 1
For the C++ backend you can use xmlrpc++ (LGPL'ed) - I'm planning to use it myself. It has very clean code so you can modify it easily if you need to.
As for the frontends in Java/Python, you could make use of Apache XML-RPC (don't know anything about it) or Python's xmlrpclib (very easy to use).
XML-RPC should be cross-platform. I've tried xmlrpc++ as server and xmlrpclib as client and it seems to work correctly, even when using faults, i.e. passing errors to the client.