分布式计算中的最佳距离函数

发布于 2024-12-02 03:56:25 字数 150 浏览 1 评论 0原文

到目前为止,用于计算 p2p 等分布式网络中两个节点之间距离的距离函数有哪些?我的意思是,如果 p2p 树网络中的每个叶节点代表一些数据,则应该有一些定义的方法来查找这些节点之间的距离。我想知道帮助我们确定这些节点之间相似性的一般做法和分布式函数。 如果我的问题本身是错误的,请原谅我。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

┊风居住的梦幻卍 2024-12-09 03:56:25

我能想到一些这样的距离函数。这取决于您的应用程序关心什么。你用这个距离函数做什么?

  1. 延迟。当节点相互通信时,它们直接测量往返时间 (RTT)。
  2. 带宽。当节点相互通信时,它们直接测量其字节/秒传输速率。
  3. IP 前缀。 IP 非常相似的节点可能非常接近,因此 149.89.1.24 和 149.89.1.100 可能非常接近。这是一个非常粗略的启发式。

我的建议是直接并持续地测量您选择的距离指标。距离度量会随着时间的推移而变化,因此要连续测量。任何不基于进行测量的各个节点的估计都可能非常不准确。您还应该记住,网络距离是不对称的。从节点 A 流向节点 B 的数据包可能采用与从 B 流向 A 的数据包完全不同的路由。

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.

待"谢繁草 2024-12-09 03:56:25
What are the distance functions so far implemented to find the distance between two nodes in distributed networks like p2p?

这取决于您使用的方法(请参阅 CAN、Kademlia、Pastry (DHT)、Tapestry (DHT)、Koorde)。但请记住,这些距离是理论上的,不一定是实际的。

在 ipv4 上的真实 P2P 实现中,所有经过 NAT 处理的对等点仅需要具有公共地址的可访问对等点。这意味着两个私有对等点之间的“距离”最多为 2。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文