“complex”是什么意思?请参阅“复杂查询”中的“复杂查询”。 P2P 架构的非结构化覆盖?
关于P2P,我知道结构化叠加对于精确匹配查询很有好处。我读到非结构化覆盖擅长复杂查询。我不明白这里的“复杂”指的是什么,在什么意义上或逻辑?
About P2P, I know that structured overlays are good for exact-match query. And I read that unstructured overlays are good at complex query. I didn't understand what "complex" refer to here, in what sense or logic ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您了解“结构化叠加”的含义。
结构化 p2p 网络实际上是与 KEY/VALUE 对一起使用的分布式哈希表(类似于简单的哈希表)。
我会尝试让它变得更简单,假设您已连接到 p2p 网络并且您想下载一首新歌曲。
首先你必须找到资源,你如何做到这一点?
在结构化 p2p 网络 (DHT) 中,您必须获取文件名并通过哈希/校验和函数传递它来创建密钥 - 现在您获得了密钥,下一步是找到存储此密钥的对等点 =>网络是有组织的,路由过程是基于密钥的。
你看到这里的问题了吗?
这些密钥是唯一的,这意味着您需要精确的密钥才能到达存储所需信息的对等方。
例如,它使关键字搜索操作变得相当困难。
“New_song.mp3”和“new_song.mp3”将产生完全不同的密钥。
然后,如果网络中有人共享文件“New_song.mp3”,您将无法通过搜索“new_song.mp3”找到它。
在非结构化的对等点中,只需用搜索查询淹没网络 - 它不是基于密钥的路由,这使得处理此类搜索查询变得更加容易。
为了解决这个“问题”,我们可以发布文件名变体的许多键。
(小写、大写、没有空格/扩展名等)
这就是 Kademlia 网络解决这个问题的方式。
Make sure you understand what "structured overlays" means.
Structured p2p networks are actually distributed hash tables that work with KEY/VALUE pairs (like a simple hash table).
Ill try to make it much simpler, Lets say you are connected to a p2p network and you'd like to download a new song.
First you have to find resources, how do you do that?
In structured p2p networks (DHT) you have to take the filename and creates a key by passing it through an hash/checksum function - Now you got the key, the next step is finding the peer that stores this key => the network is organized, the routing process is based on the key.
Do you see the problem here?
These keys are uniqe, It means you need the EXACT key in order to reach the peer which stores the needed information.
For example, It makes keywords search operation quite difficult.
"New_song.mp3" and "new_song.mp3" will produce completely different keys.
Then if someone in the network shares the file - "New_song.mp3", you wont find it by searching "new_song.mp3".
In unstructured a peer just flood the network with a search query - It is not a key based routing which makes it alot easier to handle such search queries.
To solve this "problem", we can publish many keys of the filename's variations.
(lower case, upper case, without spaces / extension, etc)
Thats how Kademlia network solves this problem.