[zeromq-dev] DEALER-ROUTER question

Goswin von Brederlow goswin-v-b at web.de
Fri Sep 26 18:20:17 CEST 2014

On Fri, Sep 26, 2014 at 01:46:20PM +0200, Pieter Hintjens wrote:
> On Fri, Sep 26, 2014 at 11:36 AM, Goswin von Brederlow
> <goswin-v-b at web.de> wrote:
> > One last thing and then I will get back to work.
> Ah, work, that mysterious thing we do when we're not talking about it :-)
> > The zring class in CZMQ I feel is still experimental and I would like
> > to keep that in flux some more, maybe throw it out alltogether and
> > replace it with the equipotent API I mentioned.
> I like the zring API and will be using it a lot to replace the old
> zhash/zlist mix that lives in various servers.

Do you actually need it? I think the only place where you need a
zhash/zlist combo is when the order in which items are added is
relevant. If the order isn't relevant then zhash already provides all
you need.

Can you give some examples? Because in czmq only czertstore used the
zhash/zlist combo and didn't even need it.

> I'm thinking, end of the year for CZMQ v3.
> What do you think about biting the snake's head off, and replacing
> ztimeout with zserver as a container for zpeer's? I mean, if this is
> our use case, why not raise the semantic level until we actually get
> something tasty?
> -Pieter

ztimeout is another building block for my PPPP protocol. It has a
somewhat more complex peer structure because it handles heartbeats,
message ack, message nack and message resends.

There could be a zserver structure that handles just heartbeating by
using ztimeout and zpeer. But that probably wouldn't be usefull for
PPPP since my heartbeats also function as ACKs/NACKs and have to be in
a specific format. But maybe that could be handled via callbacks.

Still, I like having simple building blocks that are self contained.
That way each block can be tested on its own and reimplemented if a
better design comes along. They can also be used in different ways.
E.g. the gossip protocol should use ztimeout too.


More information about the zeromq-dev mailing list