[zeromq-dev] Any way to get info on subscribers?
Brian Granger
ellisonbg at gmail.com
Sat Jul 24 17:13:03 CEST 2010
On Sat, Jul 24, 2010 at 7:52 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Sat, Jul 24, 2010 at 4:38 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
>
>> My rationale for hiding the info is that the semantics are not
>> consistent across different topologies...
>
> Understood, but this is not blocking discussion in areas such as
> subscription upstreaming, which make sense only for a TCP unicast
> topology. Looks like a perfect abstraction of all transport
> mechanisms is not possible, nor needed. I'd suggest that the
> architect knows when it's worth doing transport-specific stuff.
>
>> Can be done. Of course, it means splitting the 0MQ codebase into two
>> parts, meaning a *lot* of both design and implementation work.
>
> So you could build all patterns on top of raw sockets, and allow user
> space patterns as well? This might be worth considering for 0MQ/3.0.
> Anyhow, I think this is a better answer than "just use TCP sockets".
I really like the idea of sticking to the connectionless model of 0MQ.
It takes a while to get used to, but we are finding that when we are
forced to design without connection information, we write better apps.
But, we do end up creating applications that use other 0MQ sockets to
communicate presence information. To handle the case described here
(knowing what SUBs are connected to a PUB), we would probably do:
* Have the publisher also have an XREQ socket that the SUBS and use an
XREP to notify the publisher of its presence.
* For high availability/fault tolerance, give each subscriber a
heartbeat and have the publisher monitor those to detect subscriber
failures.
While it take a bit to write this type of code, we find it works
extremely well and honestly easier than handling connection logic in
traditional TCP sockets.
Cheers,
Brian
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com
More information about the zeromq-dev
mailing list