PNRP - How does it work?

2019-08-18 15:31发布

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

标签: .net cloud pnrp
2条回答
别忘想泡老子
2楼-- · 2019-08-18 16:08

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.

查看更多
The star\"
3楼-- · 2019-08-18 16:19

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.

查看更多
登录 后发表回答