Discussion:
[zeromq-dev] Load balancing broker with support for multiple simultaneous client messages?
Jeremy Morton
2016-10-10 09:08:56 UTC
Permalink
I've been looking into what pattern to use for my applications, and it
looks like I want something similar to the "Load balancing broker"
example in the ZeroMQ guide. However, the one problem with that is
that it assumes the clients will just be sending one message at a
time. Is there a pattern like that, but one that allows a client to
send off lots of messages simultaneously?

I suspect it would require each message to have a message ID so that
it can be routed back to the correct client (messages might come back
to the client in a different order to which they were sent, so you
can't rely on order to determine which sent message the response
message pertains to).
--
Best regards,
Jeremy Morton (Jez)
Kevin Sapper
2016-10-10 09:24:27 UTC
Permalink
Hi Jeremy,

continue reading chapter 4 (
http://zguide.zeromq.org/page:all#reliable-request-reply) which should hold
the solution!

Fyi, when sending to a ROUTER socket zeromq attaches a sender ID
automatically. If you need to keep the order of messages you'll need to add
message IDs yourself.

//Kevin
Post by Jeremy Morton
I've been looking into what pattern to use for my applications, and it
looks like I want something similar to the "Load balancing broker" example
in the ZeroMQ guide. However, the one problem with that is that it assumes
the clients will just be sending one message at a time. Is there a pattern
like that, but one that allows a client to send off lots of messages
simultaneously?
I suspect it would require each message to have a message ID so that it
can be routed back to the correct client (messages might come back to the
client in a different order to which they were sent, so you can't rely on
order to determine which sent message the response message pertains to).
--
Best regards,
Jeremy Morton (Jez)
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Jeremy Morton
2016-10-11 21:56:06 UTC
Permalink
Post by Kevin Sapper
Hi Jeremy,
continue reading chapter 4
(http://zguide.zeromq.org/page:all#reliable-request-reply) which
should hold the solution!
I read it don't understand which part of chapter 4 you're referring to
which is pertinent to this situation - could you enlighten me?
Post by Kevin Sapper
Fyi, when sending to a ROUTER socket zeromq attaches a sender ID
automatically. If you need to keep the order of messages you'll need
to add message IDs yourself.
So does chapter 4 address this or not?
--
Best regards,
Jeremy Morton (Jez)
joe meiring
2016-10-11 22:14:09 UTC
Permalink
check out the asynchronous request reply stuff in
http://zguide.zeromq.org/py:asyncsrv which uses all ROUTER/DEALER sockets.
Post by Jeremy Morton
Post by Kevin Sapper
Hi Jeremy,
continue reading chapter 4
(http://zguide.zeromq.org/page:all#reliable-request-reply) which
should hold the solution!
I read it don't understand which part of chapter 4 you're referring to
which is pertinent to this situation - could you enlighten me?
Fyi, when sending to a ROUTER socket zeromq attaches a sender ID
Post by Kevin Sapper
automatically. If you need to keep the order of messages you'll need
to add message IDs yourself.
So does chapter 4 address this or not?
--
Best regards,
Jeremy Morton (Jez)
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Jeremy Morton
2016-10-11 22:45:59 UTC
Permalink
I find that a bit of an odd example. Doesn't the ability for a client
to asynchronously send lots of messages to a pool of workers imply the
need for message IDs? Otherwise the client doesn't know which message
a response is to. Yet that example doesn't make any attempt at
message IDs.
--
Best regards,
Jeremy Morton (Jez)
Post by joe meiring
check out the asynchronous request reply stuff in
http://zguide.zeromq.org/py:asyncsrv which uses all ROUTER/DEALER sockets.
Hi Jeremy,
continue reading chapter 4
(http://zguide.zeromq.org/page:all#reliable-request-reply
<http://zguide.zeromq.org/page:all#reliable-request-reply>) which
should hold the solution!
I read it don't understand which part of chapter 4 you're
referring to which is pertinent to this situation - could you
enlighten me?
Fyi, when sending to a ROUTER socket zeromq attaches a sender ID
automatically. If you need to keep the order of messages you'll need
to add message IDs yourself.
So does chapter 4 address this or not?
--
Best regards,
Jeremy Morton (Jez)
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
joe meiring
2016-10-11 23:35:37 UTC
Permalink
Well if you want to send multiple messages to your workers without waiting
for a reply, that's kind of the way you need to go. Yes, you can add a uuid
or something on the message from the client and send it as part of the
multipart message.
I find that a bit of an odd example. Doesn't the ability for a client to
asynchronously send lots of messages to a pool of workers imply the need
for message IDs? Otherwise the client doesn't know which message a
response is to. Yet that example doesn't make any attempt at message IDs.
--
Best regards,
Jeremy Morton (Jez)
Post by joe meiring
check out the asynchronous request reply stuff in
http://zguide.zeromq.org/py:asyncsrv which uses all ROUTER/DEALER sockets.
Hi Jeremy,
continue reading chapter 4
(http://zguide.zeromq.org/page:all#reliable-request-reply
<http://zguide.zeromq.org/page:all#reliable-request-reply>) which
should hold the solution!
I read it don't understand which part of chapter 4 you're
referring to which is pertinent to this situation - could you
enlighten me?
Fyi, when sending to a ROUTER socket zeromq attaches a sender ID
automatically. If you need to keep the order of messages you'll need
to add message IDs yourself.
So does chapter 4 address this or not?
--
Best regards,
Jeremy Morton (Jez)
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Loading...