[nanomsg] REQ/REP worker example

  • From: Ramakrishna Mallireddy <ramakrishna.malli@xxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Fri, 13 Jun 2014 10:34:05 +0530

I am new to nanomsg and I am looking to implement a client/server
service using REQ/REP.

Server is a stateless service, but depends on another google service for
reply to incoming requests. REP Service should be either asynchronous, so
that it can handle other REQ requests in the queue while data gets ready
form google service, or it should start workers[ideally from pool] to
process REQ request in the queue.

But I have not found any examples that does anyone of the above or may be I
am missed some docs.

The example req/rep is targeted at synchronous REP implementations.

I am looking for, how to start a worker / create a pool of workers at
service start and assign worker to each incoming request.

Or, with asynchronous REP how can I send the reply to the
appropriate/correct client/REQ when data gets ready.

I have seen a thread regarding SP RAW that can be used, but not sure how it
helps in my case.

I appreciate any help or guidance.

R K.

Other related posts: