[zeromq-dev] [PATCH] ZMQ_PEER_EXISTS option

Pieter Hintjens ph at imatix.com
Wed Jun 8 12:25:52 CEST 2011

On Wed, Jun 8, 2011 at 4:38 AM, Artur Brugeman <brugeman.artur at gmail.com> wrote:

> Yes, thats right, If you've got a better idea how to solve my problem, I'll
> be happy to try it.

A few things come to mind. As Lucas says, this seems close to the
Freelance pattern so I'd definitely try to use that. There are are
number of aspects that could be helpful:

* knowing the peer's identity without hard-coding it.
* using ping-pong heartbeats to know when a peer is online.
* splitting peers into clients and servers.

Even if you want every node to be both a client and a server,
splitting the flow would be better IMO than trying to both connect and
bind on the same socket.

You should not need to patch 0MQ to make this work.


More information about the zeromq-dev mailing list