[nanomsg] Asynchronous REPREQ

  • From: Bradley Volen <bradvolen@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 4 Feb 2014 13:53:25 -0800

Hello,

I have looked through the archives and have seen this come up multiple
times, but I haven't seen any concrete answer to this. How can I have a
single worker thread process multiple requests (from the same or different
clients) simultaneously.

Say I get a request that I can't fulfill until data becomes available a few
seconds later. I'd like the worker to be able to hold onto the request and
process others in the meantime. The worker then might get triggered via
another socket (maybe a bus type broadcast to all workers) that new data is
available and then the outstanding request can maybe be fulfilled.

I currently have a service that is using an Asynchronous (node like)
webserver to accomplish this, but its using http simply to take advantage
of the node-like webserver. If I could use nanomsg sockets and take
advantage of tcp/unix/inproc and the more interesting control paradigms
provided by nanomsg, that would be great.

Thanks!

Other related posts: