分布式计算中的最佳距离函数
到目前为止,用于计算 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我能想到一些这样的距离函数。这取决于您的应用程序关心什么。你用这个距离函数做什么?
我的建议是直接并持续地测量您选择的距离指标。距离度量会随着时间的推移而变化,因此要连续测量。任何不基于进行测量的各个节点的估计都可能非常不准确。您还应该记住,网络距离是不对称的。从节点 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?
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.
这取决于您使用的方法(请参阅 CAN、Kademlia、Pastry (DHT)、Tapestry (DHT)、Koorde)。但请记住,这些距离是理论上的,不一定是实际的。
在 ipv4 上的真实 P2P 实现中,所有经过 NAT 处理的对等点仅需要具有公共地址的可访问对等点。这意味着两个私有对等点之间的“距离”最多为 2。
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.