开发者

best distance functions in distributed compuing [closed]

开发者 https://www.devze.com 2023-03-31 09:29 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete,开发者_运维问答 overly broad, or rhetorical andcannot be reasonably answered in its current form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete,开发者_运维问答 overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

What are the distance functions so far implemented to find the distance between two nodes in distributed networks like p2p? i mean if each leaf node in a p2p tree network represents some data, there should be some defined ways to find distance between these nodes. I want to know the general practices and the distributed functions that help us to determine the similarity between these nodes. If my question itself is wrong please forgive me.


I can think of a few distance functions like this. It depends on what your application cares about. What are you using this distance function for?

  1. Latency. When nodes talk to each other they directly measure the Round Trip Time (RTT).
  2. Bandwidth. When nodes talk to each other they directly measure their bytes/sec transfer rate.
  3. IP prefix. Nodes with very similar IPs are probably close together, so 149.89.1.24 and 149.89.1.100 are probably very close together. This is a very coarse heuristic.

My advice is to directly and continuously measure whatever you pick as your distance metric. The distance metric will change over time, so measure it continuously. Any estimate that isn't based on the individual nodes taking measurements is likely to be wildly inaccurate. You should also remember that network distances are asymmetric. Packets the flow from node A to node B might take an entirely different route than those flowing from B to A.


What are the distance functions so far implemented to find the distance between two nodes in distributed networks like p2p?

It depends of the method you are using (see CAN, Kademlia, Pastry (DHT), Tapestry (DHT), Koorde). But keep in mind that these distances are theoretical and not necessarily pratical.

In a real P2P implementation on ipv4, all NAT-ed peers only need a reachable peer with a public address. Meaning the 'distance' between two private peers is at most 2.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号