RPC Framework in C++ utilizing ZeroMQ
Asked Answered
S

2

4

I need to write a client-server application in C++ using ZeroMQ push-pull socket pattern. The client has to make RPC calls to the functions specified in the server interface. I wonder if there is an open source and commercially usable library/framework for this purpose primarily in C++. I made some googling and there seem to be things written in python but I prefer something in C++ that comes handy with ZeroMQ if possible. Any suggestion/guidance is appreciated. Thanks.

Selfinterest answered 12/2, 2013 at 10:25 Comment(2)
Did you check google protobuf? Here's also some more info about your question: #10506264Napoleonnapoleonic
Also think over, if PUSH-PULL is the best messaging pattern for RPC implementation (since I think it unnecessarily limits scalability). The REQ-REP pattern in combination with ROUTER-DEALER might be a better choice. Have a look at the ZeroMQ guide, I'm pretty sure you'll find s.th. more appropriate ...Napoleonnapoleonic
Z
3

Google protobuf provides to generate client method wrappers and stubs for RPC services usable in C++.

The user must explicitly define the transport mechanism used for this, ZeroMQ would be an appropriate choice for implementation IMHO (So this is other way round as you have asked, but makes no difference in the end).

There's another SO question that provides some more details about the available alternatives: 'Which rpc/messaging framework would best fit this case?'

Zendavesta answered 12/2, 2013 at 10:46 Comment(0)
W
2

Thrift RPC framework plays well with ZeroMQ REQ/REP sockets as a transport. Thrift source repository contains a sample in C++ that has couple of reusable classes: https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=tree;f=contrib/zeromq;h=14bbc6f51dae649b423f9157c08abac27157d416;hb=HEAD

Recently I started ThriftZMQ open-source project with the goal to implement interoperable ZeroMQ transport for Thrift in different languages. However, for now it only has Java implementation: https://github.com/thriftzmq

Wilonah answered 12/2, 2013 at 17:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.