[nanomsg] Re: modular nn_device

  • From: Drew Crawford <drew@xxxxxxxxxxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 13 Jun 2014 02:18:51 -0500

On Jun 13, 2014, at 12:58 AM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:

> What I mean by that is that "device" is something that preserves the
> overall behaviour of the protocol. I.e. if it is placed into pub/sub
> topology, the topology would still distribute the messages to all
> subscribers. If placed into req/rep topology, the topology would still
> load balance the requests among the workers in a cluster. Et c.

So an interesting case is a maybe-device I’ve created that I tentatively call 
ni_caching_device().  In the initial condition, it acts like a device, 
distributing the messages in the device-like way.  But in the case that it has 
seen the request recently it responds by itself, which is a decidedly 
non-device-like behavior.  But I don’t think it’s correct to call it an 
*application* either, because the idea of a caching “thing” (whatever you want 
to call it) is an application-independent idea.

I don’t really know how that affects the semantics here, but it seems relevant.

Other related posts: