[zeromq-dev] HWM ignored on inproc connection

Douglas Creager dcreager at dcreager.net
Mon Jan 3 17:18:37 CET 2011


> 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.

That makes sense.

> 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

I like the symmetric design — that way nothing is ignored, like Pieter suggests.  And it also matches the TCP case better.  In the TCP case, there's a buffer of SNDHWM messages on one side, and a buffer of RCVHWM messages on the other.  So in the inproc case, there should be a single buffer of SNDHWM+RCVHWM messages.

–doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110103/3486e76a/attachment.sig>


More information about the zeromq-dev mailing list