[zeromq-dev] Draft proposal for revamped ZMQ_MONITOR functionality

Pieter Hintjens ph at imatix.com
Tue Oct 1 18:42:55 CEST 2013


On Tue, Oct 1, 2013 at 5:50 PM, gonzalo diethelm <gdiethelm at dcv.cl> wrote:

> 1.       Some sockets don’t have identities, hence the need to print the socket descriptor in a portable way.

Socket type as printable string? In most applications that's enough to
identify the socket.

> 2.       Some sockets DO have identities, hence the event type ZMQ_EVENT_REMOTE_IDENTIFIED (better name?) that would allow you to ascertain that identity for a remote socket; this gives the program a shot at creating a mapping from remote socket id (descriptor) to identity.

I think asking readers to correlate events is nasty; it excludes
grep-style filtering.

> 3.       I would stick with event numbers, it seems to be easier for the implementation (and bindings) to figure out the event type, rather than parsing a string.

If it's a short keyword, e.g. CONNECTED, BOUND, PIPEFULL, etc, then
it's easy to parse, and trivial to use without any processing. I think
a major use case for monitoring is to debug a confusing topology, and
the more work you need to do in order to get debug information, the
less people will use it.

> 4.       I am convinced now key=value lines is the way to go.

Yes. If you're going to use text here anyhow I strongly encourage to
avoid magic numbers everywhere. You can make it totally consistent;
e.g. event=SomeName.

-Pieter



More information about the zeromq-dev mailing list