[zeromq-dev] REQ/REP socket with futures and promises
Jeff Vienneau
jpvienneau at gmail.com
Tue Apr 15 15:52:01 CEST 2014
I'm designing a monitor and control interface for a number of services. We
need positive feedback and so I would like to use REQ/REP channels to get a
response for each request.
However, I'm concerned about the synchronous nature of the channel and the
fact that I would need to wait for each request to complete before sending
another request. I have read a bit about ROUTER/DEALER pattern and it seems
like they would work but it could use some abstraction for my purposes to
hide the routing details.
Does it make sense to use C++ 11 futures such that a request could be made
that returns a future<zmq_message>? In this way, a number of requests could
be issued and then await called on the set of futures?
The future would encapsulate the details required to correlate the request
with a response.
Has anyone mixed these concepts?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140415/6cf11aa7/attachment.htm>
More information about the zeromq-dev
mailing list