[zeromq-dev] [0MQ/3.0] discuss: rename XREP to ROUTER
Martin Lucina
mato at kotelna.sk
Fri Mar 18 15:02:59 CET 2011
ph at imatix.com said:
> Hi all,
>
> There is enormous confusion among new users about how to use the
> advanced socket types, and specifically XREP. Here is a (not unusual)
> question from IRC today:
>
> "I need to implement a push-pull with a custom loadbalancing strategy,
> what would be the recommend method? adjust the source and create a new
> socket type? implement it using PAIR's?"
>
> It shows just how hard it is for new users to grasp these concepts,
> and the XREP/XREQ socket type names are IMO seriously to blame.
>
> I'd like to make it absolutely unambiguous that to do custom routing,
> one uses the socket type we call XREP, and achieve this by renaming
> that socket type to ROUTER. Thus one connects a ROUTER socket to other
> socket types, and the ROUTER socket does routing of messages according
> to an envelope that the application prepares.
>
> For symmetry I'd also suggest renaming XREQ but don't have a better
> name than the one already suggested in Ch3 of the Guide, namely
> DEALER.
>
> My suggestion would be to introduce ROUTER/DEALER as aliases in the
> next minor release of 0MQ, and to make these the official names in
> 3.0. REQ/REP can stay as they are, they are clear enough.
>
> Comments, objections?
I agree that there is demand for a socket type, or types, to provide custom
routing. See the more recent thread on "ROUTER vs. XREP" where I outline
some groups of users using this to implement various different kinds of
functionality.
However, I do not think that simply renaming XREQ/XREP, which as Martin Sustrik
writes is intended as a building block for a higher-level REQ/REP pattern,
is the right approach here, despite it looking like an "easy way out" right
now.
Rather than equating ROUTER with XREP, we should investigate what custom
routing functionality our users need and formalise that properly for 3.0.
So, +1 for defining a real ROUTER. -1 for just renaming XREP to ROUTER.
-mato
More information about the zeromq-dev
mailing list