Wednesday, January 21, 2009

Peer-2-Peer using WCF NetPeerTCPBinding


Microsoft .NET Framework 3.0 /3.5 comes with new WCF  binding called  netPeerTcpBinding .

Using WCF NetPeerTCPBinding we can develop a peer-to-peer networking applications that use a TCP-level peer-to-peer mesh infrastructure.

Example for the Peer-to-Peer Application : IM , File Sharing Application,games etc.

In Traditional Client Server model we have Single  Server  and 1 to N number of clients making request to the server which is configured in centralized location.


In Traditional Client/Server application 



In peer-to-peer (P2P) application  each participate (node) acts as both a client and a server to the other participants in the network.


WCF Service Contract :




In peer-to-peer network environment peers rely on name resolution systems to resolve each other's network locations (addresses, protocols, and ports) from names .Peer-to-peer name resolution has been complicated by transient connectivity and shortcomings in the Domain Name System (DNS). [MS-Source]

The Microsoft® Windows® Peer-to-Peer Networking platform solves this problem with the Peer Name Resolution Protocol (PNRP).

if you look at the below configuration we set Pnrp mode for the reslover .



Testing the Application with two Peer.






Gopal Chauhan said...

Hi, there is node resolver in config file. in which mode is pnrp whats the use of that node and i am not getting that node in my wcf config file.. how to get that node?

Shalini Mudhalayar said...

Extraordinary explanation was given to the Dot Net Framework’s new features. Each and every framework was clearly understood through your examples. Keep updating more information on .Net frameworks.
DOT NET Training Institute in Chennai
DOT NET Training Institutes in Chennai