On Thu, Feb 21, 2013 at 1:39 PM, Neylor Ohmaly Rodrigues e Silva <[email protected]> wrote:
> Why ZRE uses two sockets for node communication. Its not better to use just > one ROUTER socket and multiplex input/output over it? This is explained in the Chapter 8 of the Guide where the protocol was developed. There are several reasons. First, ROUTER-to-ROUTER connections (which you're suggesting) are not easy. One of the nodes has to cheat in various ways. Second, this does not work nicely for a real peer to peer network since it's asymmetric. Third, you aren't certain of getting a buffer you can send messages to (so you lose the first messages sent to a node). So we have a single ROUTER socket for input, and one DEALER per peer for output. This is simple, and works reliably. FWIW we did experiment with other combinations like PUB-SUB and PUSH-PULL but they don't work reliable for various reasons. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
