Question

I'm going to implement a distributed message bus over ZeroMQ and I'm trying to make it as efficient as possible. My requirements are:

  • multiple processes are connected to a bus, some of them are on the same machine, some not.
  • processes can subscribe to some topics
  • unfortunately, no multicast (it is not supported in the production environment - Amazon)
  • I need multilanguage soultion (at least for C++, Haskell and Python)

Approaches I'm considering are:

1. Directory Service + Mesh topology

  • there is a single Directory Service which has a list of all connected processes and their addresses.
  • each process connects to DS on start and asks for addresses of others
  • each process has a Pub and Sub sockets connected to all other processes (mesh topology)

2. Broker

  • all processes are connected to a broker which distributes messages using Pub socket.

Are there any other/better architectures to use with ZeroMQ to create such message bus?

No correct solution

OTHER TIPS

I suggest you to have a look to nanomsg, which has a built-in BUS topology and some other interesting ones like SURVEY. It is a library by Martin Sustrik the original zmq author.

You can find some discussion about BUS on Martin Sustrik blog: http://250bpm.com/blog:17

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top