[zeromq-dev] PUB-SUB with asynchronous response

Rajalakshmi Iyer rajalakshmi.iyer at blis.com
Mon May 9 01:22:07 CEST 2016


Hello,

I am working on an auction server which needs to forward each incoming
request to several bidding services and conduct an auction based on the
responses received from the bidders in real-time.

One option is to employ asynchronous REQ-REP using ROUTER-DEALER against
each bidder for every incoming request. As the number of bidder types
increases, this option will cause the auction server to run out of sockets.
Also note that each bidder, is actually a group of auto-scaling bidder
instances behind a load balancer. Can ROUTER-DEALER work with a 3rd party
load balancer in between?

Another option is to use PUB-SUB, where the incoming request is published
by the auction server and the bidders subscribe to the same, except the
bidders now need to respond with their bids. One could potentially employ a
cache to save the bids from all bidders and have the auction server query
this cache. But that means that the auction server needs to necessarily
wait for a max timeout before querying this cache, even though bidders
would have responded way before the timeout.

Are there any established ZeroMQ patterns that aim to solve such cases? Any
advice is greatly appreciated.

Thanks!

-- 
This email and any attachments to it may be confidential and are 
intended solely for the use of the individual to whom it is addressed. Any 
views or opinions expressed are solely those of the author and do not 
necessarily represent those of Blis Ltd, a company registered in England 
and Wales with registered number 06455773. Its registered office is 5th 
Floor, 85 Tottenham Court Road, London, W1T 4TQ, United Kingdom.

If you are not the intended recipient of this email, you must neither take 
any action based upon its contents, nor copy or show it to anyone. Please 
contact the sender if you believe you have received this email in error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160509/322a6875/attachment.htm>


More information about the zeromq-dev mailing list