[zeromq-dev] GSoC ideas inquiry

Martin Sustrik sustrik at 250bpm.com
Mon Mar 14 21:18:25 CET 2011


Hi Yin,

> Thanks for clarifying this. So we are going to support a new option, 
> ZMQ_PRIORITY, which is valid only for 0MQ sockets of types PUSH and 
> (X)REQ. 

Exactly.

> When we do xattach_pipes(), the current value of this option 
> (i.e., priority or preference) is attached to the added outpipe as well. 
> The backend load balancer, which maintains multiple priority lists, then 
> puts these pipes in the right place. In this way, the load balancer 
> selects a pipe to send the message in O(1) time (perhaps with the same 
> find-first-bit-set instruction as the Linux kernel) instead of 
> round-robin. Correct?

Yes.

As for O(1), the existing load-balancer is already O(1) so it should not
be that hard. You should just hold a list of pipe-arrays, one for each
priority and fall over to the next one when there's no active pipe in
the previous one.

> OK. Then I'll try to write some POC code in this week.

Great!

Martin


More information about the zeromq-dev mailing list