[zeromq-dev] zmq-socket name aliases (was: Re: Why ZeroMQ?)

Pieter Hintjens ph at imatix.com
Tue Jul 27 18:01:51 CEST 2010

On Tue, Jul 27, 2010 at 5:55 PM, Oliver Smith <oliver at kfs.org> wrote:

> Primarily: using stdin/stdout may cause naming conflicts and confusion

Probably.  The pipeline pattern is the only one without clear roles
for nodes (see http://api.zeromq.org/zmq_socket.html).

> they are only borrowing from the concept of stdin/stdout, they are in no way
> related. Plus we don't want someone to misunderstand them as the default
> sockets for zmq.

Borrowing is good, especially when it works as you'd expect.

> ZMQ_SOCK_REQREP_GENERATOR (aka ZMQ_REQ, the requester)  =>
> zmq.sock.reqrep.generator
> ZMQ_SOCK_REQREP_BROKER (alias for ZMQ_REP, the responder) =>
> zmq.sock.reqrep.broker

I'd be careful about inventing new concepts (generator, broker) that
aren't referenced anywhere else.  Just more stuff to learn.  The man
page already clearly refers to client and service, and these work as
you'd expect IMO.

> ZMQ_SOCK_BROADCAST_PUBLISHER (aka ZMQ_PUB) => zmq.sock.broadcast.publisher
> ZMQ_SOCK_BROADCAST_SUBSCRIBER (aka ZMQ_SUB) => zmq.sock.broadcast.subscriber

BROADCAST is nice but the pattern is called "pubsub" and one reason
for the long names is to make pattern names explicit so people are
less likely to mix the wrong socket types.  If we were going to rename
it, I'd suggest TOPIC, which is an existing unsurprising term.


More information about the zeromq-dev mailing list