[zeromq-dev] conventions in bindings

michael.compton@littleedge.co.uk michael.compton at littleedge.co.uk
Fri Feb 3 13:01:40 CET 2012

Maybe not the right thread; I think I would be in agreement with Martin here, subscribing to everything from the get go seems a little dangerous and not in keeping with subscription semantics, you subscribe to topics you wish to consumer, I think this is a pretty standard concept, no?


----- Reply message -----
From: "Pieter Hintjens" <ph at imatix.com>
To: "ZeroMQ development list" <zeromq-dev at lists.zeromq.org>
Subject: [zeromq-dev] conventions in bindings
Date: Fri, Feb 3, 2012 10:40

On Fri, Feb 3, 2012 at 11:20 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:

> I found this one a bit worrying, and if I've read the thread
> correctly, Pieter didn't respond to it (though Martin S. responded he
> thought it was a bad idea).
> Can we have this reverted or standardized across bindings? It seems
> like a rather import thing to make consistent.

I'd suggested this ages ago for the core API since it is a systematic
cause for confusion for new users. You create a SUB socket and connect
it, and it does nothing. Martin's argument was based iirc on
implementation aspects. Since all subscriptions are additive, you
should start with "nothing", not "everything".

To some extent this disagreement (ease of use vs. technical arguments)
was resolved by allowing high-level bindings to act as applications
expect, and keep the low-level binding as-is.

I'd documented this and other similar "fixes" when I started CZMQ.
It'd be great to follow through and as you suggest, get consistency
throughout all bindings.

TBH I'd prefer that libzmq just acted less eccentrically in certain
cases. A lot of CZMQ was just to compensate for weirdness in libzmq
that I could not patch or argue out.

Perhaps if the binding authors can agree on consistent high-level
semantics we can all aim at, over time these can be pushed down to
libzmq as well.

As Benjamin suggested, an excellent topic for the Portland meetup.

zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120203/6fdd472a/attachment.htm>

More information about the zeromq-dev mailing list