[zeromq-dev] Unknown number of workers???

Lucas Hope lucas.r.hope at gmail.com
Thu Mar 15 03:15:52 CET 2012


Dmitry,

Have them send a "PING" to the boss, and then recv for a "PONG" from the
boss. They'll block on the recv.

(but read the guide it answers what you want very clearly.)

-Luke

On Thu, Mar 15, 2012 at 7:01 AM, Pieter Hintjens <ph at imatix.com> wrote:

> Dmitry,
>
> Your best action is to read the Guide and especially the chapter on
> custom routing.
>
> -Pieter
>
> On Wed, Mar 14, 2012 at 1:35 PM, Dmitry Nikiforov <dniq at dniq-online.com>
> wrote:
> > So what if I don't know how many workers there are? I'v'e tried to have
> the workers open ZMQ_REQ sockets to boss, and it works fine on Mac OS X,
> where workers block on "send" until the boss is up and alive. But on Linux
> the "send" doesn't block, even if the boss does not exist yet (and no error
> returned either), so this approach does not work.
> >
> > For now I made every worker register in MySQL database, and boss gets
> the list from MySQL and opens connection to every worker, but this is not
> perfect: currently workers can't join or leave in the middle of the task.
> Well, they can leave, but that'd be bad.
> >
> > Can anybody offer any ideas on how to best implement this?
> >
> > --
> > Regards - Dmitry
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



-- 
---------------------------------------------------
Dr Lucas Hope - lucas.r.hope at skype
Machine Learning and Software Engineering Consultant
Melbourne, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120315/f075b008/attachment.htm>


More information about the zeromq-dev mailing list