RPC from C++-Client to a Java-Server

O

Oliver Hirschi

Hi,

I have to implement a Client-Server-Architecture. A C++ client should
call a remote method (with a few of String parameters) on a java client
and get back a boolean value.
I think I am a little confused.

Which architecture should I take?
Do I have to use CORBA, or is there an alternative (RMI, ...)?

Thanks.
 
T

Tomislav Petrovic

If you really have so simple case (one remote method, few string
params, one return value) and if speed is not your major concern,
I'd recommend XMLRPC...
It is xml based protocol, easy to debug, easy to implement
both in c++ and Java due to publicly available client/server libraries.
It took me 1 day to have my my first method "up and running"
from the scratch (I never heard of it before).

CORBA and RMI are much complicated, require lots of work,
other elements like object broker and such which you really do
not need, etc....

There is only one drawback to xmlrpc, that is speed....
It works over HTTP post which means you build request
(few miliseconds) post request over net (at least one network
roundtrip), server does processing (again few milliseconds)
and get back response (at least one network roundtrip)....

These network roundtrips can kill your app if you need to
call your method(s) frequently and one by one.
In my case I had many methods called frequently but
they were independent (I did not need output of one to
call another) so I called them all at once (system.multiCall)
so I has only two net roundtrips instead of n (number of calls)
times two.

Tomy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top