12

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?

Community
  • 1
  • 1
remdezx
  • 2,939
  • 28
  • 49
  • 1
    Have a look into Vert.x (http://vertx.io/) It can help you to implement a service bus. – jschiavon Mar 06 '14 at 01:04
  • There's a bridge for ZMQ and Vert.x at https://github.com/p14n/vert-zeromq – jschiavon Mar 06 '14 at 01:21
  • Thanks for your response! Unfortunately your solution is for Java but I need it multilanguage (some components are in C++, some in Haskell and some in Python). I updated the question. – remdezx Mar 11 '14 at 14:47

1 Answers1

3

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

mguijarr
  • 7,641
  • 6
  • 45
  • 72