[nanomsg] Re: BUS pattern

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: Schmurfy <schmurfy@xxxxxxxxx>
  • Date: Thu, 21 Feb 2013 13:17:49 +0100

On 21/02/13 12:54, Schmurfy wrote:

Concerning the topic, the more I think about it the more I like this bus
pattern which is something I already tried to implement
using a PUSH and a PULL socket in each "node", having a dedicated
pattern for what seems a common usage makes it way easier to manage.

The strange thing that happened with ZeroMQ is that it seems like everybody is trying to implement different messaging patterns on top of the existing ones instead of adding the patterns to the library itself.

It's kind of like if people tried to implement UDP on top of TCP because TCP was the only transport provided by the OS and everybody considered adding UDP to the OS to be too difficult or something.

How it ends up is re-purposing existing patterns (like PUSH/PULL in your case) to do a job they were not designed for (e.g. BUS semantics). The result is always convoluted and often does not work as expected in corner cases or breaks under load.

I've tried to make the situation better with nanomsg by specifying clean API to be implemented by individual messaging patterns (src/protocol.h). Hopefully, that'll make it easier for people to add new patterns to the library itself.

Martin

Other related posts: