[zeromq-dev] matching REQ-REP on one side with PUB & PULL on the other side
Pieter Hintjens
ph at imatix.com
Tue May 31 06:02:47 CEST 2011
On Mon, May 30, 2011 at 5:20 PM, <alotsof at gmx.net> wrote:
> I'm wondering about the following case:
> Here is the implementation I've come up with in terms of communication
> patterns:
>
> C:REQ -> REP:S
> S:PUB -> SUB:W1..Wn
> S:PULL <- PUSH:W1..Wn
> c:REQ <- REP:S
Pub-sub will send the request to ALL workers. They will all therefore
reply to the same single request, which is not what you want.
It's probably not a good idea for clients to ask about the internal
state of a server, that's bad design. However if you really want to
return some state produced by N workers you have to synchronize this
in the server to get a single reply message.
Continue reading the Guide until it becomes clear, that's my advice.
-Pieter
More information about the zeromq-dev
mailing list