PNRP - How does it work?

為{幸葍}努か 提交于 2019-12-12 04:07:02

问题


Sorry if this seems like a stupid question but im actually having a hard time finding a straight answer. I know PNRP is MS's technology for implementing peer-to-peer but how does it actually work - i mean im assuming when you register your address in the global cloud that it is actually contacting a Microsoft server to find a peer address then handing back the peer endpoint info.

Im a little confused still as to how addresses are found in the cloud when say there are only 2 peers located across the globe.

... From what i understand there has to be a peer resolver to maintain a list of registrations (assuming a brand new node comes online) it then hands addresses of its closest neighbors to connect to. This can be a central server that I own if i choose to use an address the services/apps know about or the global cloud which i assume uses a peer resolver that microsoft operates.

Thanks


回答1:


From the Wikipedia page:

Internally, PNRP uses an architecture similar to distributed hash table systems such as Chord or Pastry. The peer name is hashed to produce a 128-bit peer identifier, and a DHT-like algorithm is used to retrieve the location of the host publishing that identifier.

This means their infrastructure is not centralized; there isn't "a Microsoft server" to ask. Metaphorically, you're asking the cloud for routing information, and it collaboratively answers.

If there were only two computers in the cloud, they would both know about each-other.




回答2:


Here's the goods

http://msdn.microsoft.com/en-us/library/ms731061.aspx

It covers the basics:

Meshes, Nodes, Channel Security, Resolvers.

And the answer to your question is the resolver. Your programs can collaborate on a peer to peer level but they need central servers to find each other instantly. You would publish a resolver to your server and all the clients would use it.



来源:https://stackoverflow.com/questions/1830392/pnrp-how-does-it-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!