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.
Patrick
source share