It might be a week or so before I get to this, but this method would be a help.

Cheers,

Brian

On Fri, Jul 9, 2010 at 1:04 AM, Martin Hurton <[email protected]> wrote:
> On Fri, Jul 9, 2010 at 9:53 AM, Martin Sustrik <[email protected]> wrote:
>> Brian Granger wrote:
>>
>>>> We have an estimate of how many messages there are in each pipe.
>>>>
>>>> HWM-style load balancing -- as it is implemented at the moment -- is a
>>>> round-robin over all the pipes that are not full.
>>>>
>>>> Choosing the least filled pipe may be computationally complex (at least
>>>> O(log n)), so using the algorithm described in the article may be a nice
>>>> optimisation.
>>>
>>> Is the information about how much each pipe has in it available in the
>>> pipe API.  If so I might give this a shot.
>>
>> I think the estimate can be computed like this:
>>
>> pipe_t::writer_t::msgs_written - pipe_t::writer_t::msgs_read
>>
>> Martin Hurton wrote the code, so he may confirm.
>
> This is correct. I can add a method for this, if it helps.
>
> - MH
>
>>
>> Martin
>> _______________________________________________
>> zeromq-dev mailing list
>> [email protected]
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
[email protected]
[email protected]
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to