I have a system which consists of two applications.

Currently, two applications communicate using multiple zeromq publish/subscribe sockets generated for each specific type of transmission.

Sockets are programmed in C.

For example, AppX uses a subcriber socket for receiving an information struct from AppY and uses a publisher socket for transmitting raw bit blocks to AppY and same applies to AppY.

It uses pub/sub sockets for transmission and reception.

To be clear AppX and AppY perform the following communications

AppX -> AppY : 

Raw bit blocks of 1kbits(continous), integer command(not continuous, depends on user)

AppY -> AppX : Information struct of 10kbits (continuous)

My goal is to use only one socket at each side for bidirectional communication in nonblocking mode.

I want two applications to process queued received packets without an excess delay. I don't want AppX to crash after a crashed AppY.

Would it be possible with zeromq? Can I use ROUTER/DEALER or any other pattern for this job?

I have read the guide but I could not figure out some aspects. Actually I'm not well experienced with zeromq. I would be pleased to hear about additional tips on this problem.

Suggestions are highly appreciated.

  • It is possible to use the router/dealer interface to make an RPC-like interface, such that AppX would call a function on AppY, AppY would compute the result, and the result would get returned to AppX on the same socket. That may be what you want. I think, though, that if you do have a continuous broadcast of data from AppY that it should go on its own subscription, as you have designed already. – Brannon Feb 3 '20 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.