How to implement WCF NetPeerTcpBinding PeerResolver

I cannot use the peer name resolution protocol on our network because our server farm routers do not support IPv6.

So I'm trying to implement my own PeerResolver using a database.

  • The Register method inserts a row with meshId, endpointUri and a list of IP addresses in the database along with the created date and returns the newly created row pointer as the registration identifier.
  • The Unregister method removes everything from this guide.
  • The update method updates the above information.
  • The My Resolve method currently IGNORES specifies the maxAddresses parameter and returns all the information in the database for this meshId.

This works well as proof of concept, but since the documentation is mostly non-existent, it's hard for me to decide how to manage things. For instance:

  • What to do with the maxAddresses parameter. In my testing, it is usually usually called with a value of 3. Why 3? Which 3 should I return? What happens if I return 3, all are inaccessible, but there are other addresses? Will he try again? And then I need to make sure that the other 3 are returned on restart? And how do I do this, by chance? Or do I need to have some information in the database about how a node is connected to other nodes, and then return those that are geographically closed?
  • If the application ceases peacefully, it will call Unregister, but this obviously does not always happen. How to manage cleaning?
  • , -, , TimeoutException, , , . , , (, PNRP), , ?
  • CanShareReferrals PeerReferralPolicy , , , , .

, - WCF, .

+5
2

MSDN Microsoft Teredo IP6/IP4.

Teredo ,

+1

All Articles