Qt and Boost RPC

I am looking for a good way to connect two systems: 1) a Qt-based application running on Ubuntu, and 2) a Boost-based application running on another Ubuntu machine. Both applications use a common library, where I would put common interface code. I would like to use an interface like RPC. I looked at CORBA and D-Bus, but I wonder what other people have used or recommend.

Thanks in advance.

+7
source share
3 answers

Apache Thrift is an RPC cross-platform platform originally developed by Facebook. The prototype that I wrote some time ago used it, I think it was pretty easy to use (I don't remember any problems). This would be a good choice if you later want to expand the system with components written in other languages.

+4
source

You may consider ØMQ . This is a cross-platform messaging library that, among other things, "automatically" handles connection problems (including reconnecting in the event of a failure). There are bindings in many languages, and the czmq library provides a good high-level C interface for many common ØMQ applications.

You can easily use the Request-Reply template for the RPC infrastructure, but when you read the guide , you may find that other samples are more suitable.

I found an RPC infrastructure built on top of ØMQ, but since you are apparently using C ++, this probably will not help you (other than for training purposes). See also this question . You could probably easily roll your own if you want.

The ØMQ license is “LGPLv3 +”, which is basically an LGPL with a static binding exception. czmq goes into MPLv2, so I won’t be surprised if the "MQ" model comes up soon. According to the creator of ØMQ, MPLv2 is very similar to the "LGPLv3 +" license, but more acceptable for corporate lawyers.

You may also consider increasing serialization for your interface code. We used czmq (including zbeacon to automatically detect the node) along with serial serialization, and it works very well. I have used XML-RPC in the past, and I really prefer the ØMQ function for the connection processing functions that it offers.

+2
source

The Internet Communications Engine (Ice) is a modern and modern RPC engine that supports many languages. You can download here . Most of the Ice API is defined in Slice, which is the Ice specification language.

Slice (Specification Language for Ice) is the main abstraction mechanism for separating object interfaces from their implementations. Slice establishes a contract between the client and server, which describes the types and interfaces of objects used by the application. This description is independent of the implementation language, so it does not matter if the client is written in the same language as the server.

Slicer definitions are compiled for a specific implementation language by the compiler, for example, for C ++.

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

0
source

All Articles