[nanomsg] Re: The name service for nanomsg

  • From: Kaspar Schiess <kaspar.schiess@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 06 Sep 2013 12:00:49 +0200

The example appeared in this thread: A -> B-C -> D  (B-C is a device)
How would you distinguish A and C ? If you think one can bind an other
can connect. Consider the following:
A -> B-C -> D-E -> F

At first, one would have a simple topology, A consuming a service from D. So A needs to know an address that resolves to D for its connect, let's call that a1.

Then an admin decides to interpose the device B-C. He modifies a1 to return B. He also comes up with another address for D (a2). This is what C connects to.

and so on.

So really, what you need for this is a table saying
a1 B
a2 D

> Yes. Look at how DNS SRV works. It gives a  list of addresses with
> priorities and weights.
Ah - for load balancing. Still, that would only mean that the table would need to map a1 to more than just B, let's say a name resolves to more than one string.

The requirement of being able to specify bind vs. connect is still pulled out of thin air. I don't see the real world use of that.

> The decision of bind vs connect is also admin's task not a
> programmer's one, so it should be in name service rather than code.
Really? Is it? The admin would have to know quite a bit about the code to be able to take the decision of connecting somewhere vs. having connects be made. Which makes him a programmer in my book.

I cannot see a situation where the underlying problem could not be solved differently (PUSH vs. PULL, active connect vs. passive connect). Do you have specific situations in mind? You gave some examples on IRC, but as a sysadmin I don't follow your reasoning why there's no other way. And as a programmer, this just looks like a problem that is orthogonal to what nanomsg does. It could well be outside of nanomsg and work just as well.

my 2 cents
kaspar




Other related posts: