[zeromq-dev] 0MQ 2.0 Model Question: Continued.
Martin Sustrik
sustrik at fastmq.com
Wed Oct 21 08:28:14 CEST 2009
Hi,
> I have some follow up questions for Martin regarding that thread.
>
> I went through zmq.h and other available information. I believe I
> understand the socket types and the kinds of queues they will support.
>
> For the ZMQ_REP type, it looks like a received message has to be
> processed immediately and the reply has to be sent before the next
> message can be read frome the Queue.
Right.
> For some kinds of services, say for example that would run lengthy
> database queries in the back end, wouldn't this be a bit too
> simplistic?
Yes. It is.
> I was expecting to see something where the application can 'receive' a
> series of messages without having to reply immediately and would be
> able to reply to each one at some point in future.
>
> Is thers plans for such a queue functionality?
Yes. The functionality should be implemented. However, at the moment the
semantics are not completely clear. As far as I understand there are at
least three scenarios here: 1. immediate replies (the implemented one)
2. passing responses down the stream rather than back to the requester
3. passing delayed responses back to the requester (your scenario).
Additionally, issues like pairing responses with requests, reordering
etc. should be addressed.
If you are able to propose a sane API for your scenario, that would be
the first step towards the solution. For example: How would you let the
system know that the response corresponds to a particular request? Etc.
Martin
More information about the zeromq-dev
mailing list