[zeromq-dev] reliable request-reply

Ilja Golshtein ilejncs at narod.ru
Thu Sep 1 19:01:46 CEST 2011


I' am trying to solve reliability problem in very simple case: several client threads communicate 
with a remote server via broker thread. 
The assumption is worker<->broker connectivity is reliable (since it is inproc), 
while server could be temporary unavailable or something.
A request has strict timelimit - if response is not in time, we don't wait any more.

Natural solution is Lazy Pirate Pattern http://zguide.zeromq.org/page:all#Client-side-Reliability-Lazy-Pirate-Pattern ,
while I am not happy with often reconnections.
That's why I've decided to use XREQ (not REQ) socket at client side.

In case anyone interested, working Linux C++ example is attached to this letter.
Or see here http://pastebin.com/TgCPTyKS


Best regards,
Ilja Golshtein.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3tier.cpp
Type: application/octet-stream
Size: 7473 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110901/c33efa8c/attachment.obj>

More information about the zeromq-dev mailing list