[nanomsg] Re: Where "Channel ID" are managed in the code ?

  • From: Laurent Alebarde <l.alebarde@xxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 14 Jan 2014 10:50:22 +0100

Le 14/01/2014 10:30, Paul Colomiets a écrit :


Have you seen this thread?
//www.freelists.org/post/nanomsg/Trying-to-implement-directory-pattern

It's not implemented yet. But does it match your use case? It may better to invest time into this stuff, because presumably it serves more use cases than NN_REQ_SCHEDULER.

From the opposite point of view if we add kinda NN_SHARDING option to all patterns, it may be interesting to have sharded patterns not only for request-reply (like directory patterns describes), but for pipeline and other patterns.

--
Paul

Hi Paul,

Thanks for the suggestion. But it does not fit my needs. In this "directory" pattern, the worker can subscribe to different request types. In my case, all clients send requests of the same type, so the only possibility with the "directory" pattern would be to subscribe to a set of clients. But it is not desired. When a client connects, I want to assign it the most available worker, and stick the client to the same worker. When the client has finished and disconnects, and reconnects say one day later, I want again to assign it the most available worker, which is not necessarily the same than the last time.

Cheers,

Laurent

Other related posts: