[zeromq-dev] Application design. Overcomplicated?
Ilja Golshtein
ilejncs at narod.ru
Fri Apr 8 10:04:17 CEST 2011
Hi Martin
08.04.2011, 09:44, "Martin Sustrik" <sustrik at 250bpm.com>:
>> My question is what is wrong in the design above and what could be simplified.
>
> So what's the scenario? A bunch of stateless workers accessing the same
> physical storage?
Yes.
It would be nice to create a generic Unix 0mq based multithread C application design.
A sort of best practice.
This application
* terminates upon a signal
* understands several different commands and process these command in parallel returning some results.
My particular questions are
* is it Ok to have poll in every worker
* is it Ok to have one socket for one command coming from outside
Main consideration - performance.
Some of important issues like "Making a Clean Exit" are covered in Pieter's Zguide (which is great), though
I think an example might be useful.
> In such a case simple request/reply pattern should do. Maybe an
> additional pub/sub feed to distribute cluster-scoped commands to all the
> workers.
You mean there is no reason to do multithreading at all? Often it is true,
but let's focus on cases when it makes sense.
Thanks.
--
Best regards,
Ilja Golshtein.
More information about the zeromq-dev
mailing list