[zeromq-dev] HWM ignored on inproc connection

Pieter Hintjens ph at imatix.com
Mon Jan 3 09:59:28 CET 2011

Consider not ignoring any of the four, but rather allowing any party to set
a HWM, which is then used, and define a rule for managing conflicts, e.g.
take the highest value.
On 3 Jan 2011 09:08, "Martin Sustrik" <sustrik at 250bpm.com> wrote:
> Hi Douglas,
>> It looks like the problem is in how the underlying pipes are created
>> for inproc connections. The pipes aren't created until the
>> zmq_connect call, and it uses the options from the connecting socket
>> for both pipes. If you change the test case so that it calls
>> setsockopt on the "in" socket (even though it's a PULL, and should
>> therefore ignore its HWM), it blocks correctly.
>> I think zmq_connect should use the binding socket's options for the
>> inbound pipe.
> That's an interesting problem consisting of several two smaller problems.
> 1. There should be inbound and outbound HWM to be set separately
> (ZMQ_SNDHWM, ZMQ_RCVHWM). This can possibly be done without breaking
> backward compatibility. Existing ZMQ_HWM would just be reimplemented as
> setting both ZMQ_SNDHWM and ZMQ_RCVHWM.
> 2. In case of tcp:// there's a buffer on each side of the connection,
> however, in case of inproc:// there's a single buffer shared by the
> peers. The question is how to set the HWM in this case.
> For example, socketpair has the same problem and solves it by using only
> SO_SNDBUF value while ignoring SO_RCVBUF value.
> In case of 0MQ we can opt either for symmetric or asymmetric design.
> Symmetric design would use the sum of ZMQ_SNDBUF+ZMQ_RCVBUF of the peers
> to compute the max HWM for the pipe.
> Asymmetric option would mimic socketpair's solution of ignoring the
> value of one peer. In such case there are 4 options:
> a. ignore sender's HWM
> b. ignore receiver's HWM
> c. ignore connecter's HWM
> d. ignore binder's HWM
> Thoughts?
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110103/8fe77745/attachment.htm>

More information about the zeromq-dev mailing list