C ++ remote method call

I have a CPU class that is responsible for processing processes and I have a process queue. The software part of the processor is implemented on the server, and the process queue is on the client side. Protocol - TCP. How can I call methods from the process of a class from the server if an instance of that class was created on the client side

What is the possible solution to this problem? Maybe it's easier to pass the object over the network to the server (if possible, of course)? Does C ++ provide some RMI library?

In fact, my Process class only has one named member string, maybe it's easier to pass that string to the server and then recreate the object on the server side?

+3


source to share


3 answers


CORBA is what you really want. It provides mechanisms for sending messages to remote objects as if they were local.



+1


source


Take a look at Thrift (http://thrift.apache.org/). This is not the only option, but it is very easy to work with, and it can also call methods and pass objects between different languages. You define a service in a custom language, run a compiler that generates C ++ code (or whatever language you like) for the client and server, and then you just call methods between machines.

There's a nice presentation on what I put on the slideshow if you're interested:



http://www.slideshare.net/dvirsky/introduction-to-thrift

+1


source


You can use XML-RPC. It is a lightweight and easy-to-use RPC engine. You can get it here .

0


source







All Articles