Peer-to-Peer (P2P) Roadmap

Windows Vista® and Windows Communication Foundation address the key challenges traditionally associated with the development and deployment of P2P applications, such as:

  • End-to-end Connectivity — uses IPv6 and connectivity technologies to provide seamless end-to-end host addressing and connectivity across most NATs and many firewalls.

  • Comprehensive Foundation — provides the capabilities required by most P2P applications, including identity and contact management, node discovery and naming, secure session initiation and communication, and scalable multi-party communication.

  • Secure and Scalable Deployment — builds on protocols engineered for large-scale deployment, provides built-in security, and provides the necessary controls to enable IT administrators to control P2P application deployment and use.

P2P solutions are characterized by dynamically-formed, self-organized and self-managed, robust, server-less communication peer networks (sometimes referred to as meshes). Each node is identified by a unique (within the mesh) peer ID. Each node shares bidirectional connections with at least its nearest neighbors. An example of a typical P2P topology is depicted in the following diagram.


To resolve peer IDs into their corresponding Internet addresses, the Peer Name Resolution Protocol (PNRP) is used instead of the DNS. Each separate peer computer, user, group, device, service, or other type of peer node can have its own peer ID. The list of IDs is distributed among the peers using a multi-level cache and referral system that allows name resolution to scale to billions of IDs, while requiring minimal resources on each node.

Using an endpoint, which is a combination of a peer ID, a port number, and a communication protocol, data can be sent among peers in one of two common ways:

  • From one peer to another peer in a directed manner.

  • From one peer to all the other others in the same mesh, commonly referred to as flooding. A flooded message may arrive at a single node multiple times through different routes.

Security can optionally be applied to meshes and their communication, including authentication, authorization, and message privacy.

P2P Development Infrastructure

Windows Vista provides a comprehensive set of developer APIs for creating P2P applications and solutions as depicted in the following diagram:


Typically, these capabilities are layered to produce a solution using the following logical scheme. Windows Vista provides support for application development at each layer, as represented in the following diagram:



IPv6 facilitates end-to-end connectivity between Internet hosts. With IPv6, each Internet host can be identified by a unique address, thereby facilitating direct person-to-person communication. Transition technologies such as 6-to-4, Teredo, and firewall traversal enable IPv6 to be used over the existing Internet without modifying existing infrastructure. In Windows Vista, IPv6 is enabled by default. P2P fully supports IPv6 and, therefore, enables seamless peer-to-peer communication.

The network subsystem of Windows Vista also has robust support for IPSec, TCP, SSL, HTTP, and other higher-level protocols. For more information, see Network Infrastructure Improvements.

The Windows Communication Foundation provides a high-level, cross-platform infrastructure for messaging solutions. For more information, see Developer Story Windows Communication Foundation.

Contact Management

P2P enables users to define their own identities and manage trusted third-party contacts. There are three general categories of operations that are common across many P2P solutions:

  • Identity creation and management — when applications first use P2P, the user is prompted to create an identity, which is associated with a unique ID within a mesh. Identities can be dynamically updated during the course of a P2P session. The Identity Manager API is commonly used for this purpose.

  • Contact management — trusted contacts are stored in the Windows Address Book (WAB). Applications can programmatically create and manage trusted contact records, using the WAB API or the Collaboration Contact APIs for WAB. The user can manually manage contacts through the WAB user interface.

  • Contact exchange — user identities and contacts are exchanged as vCards to and from the WAB. Users can simply copy-and-paste or drag-and-drop these vCards to send their own identities to other users, import identities from other users, or share trusted contacts.


Peer identities are transitory, lasting only for the P2P session. To achieve permanence, identities must be stored as WAB contacts.

Naming and Discovery

P2P eases the discovery of endpoints for communication and collaboration. Two methods of discovery are supported: ad-hoc discovery on the local LAN and directed discovery over the Internet. Windows Vista contains the following two technologies to support these two types of discovery, respectively:

  • People Near Me — this service supports discovery on the local LAN. Applications can query discovered endpoints to receive information required to create a persistent trusted contact in the WAB. The People Near Me service allows running applications to publish arbitrary data to other nodes on the LAN. This data can be used to communicate information about running, or specific data needed to establish application sessions.

  • Peer Name Resolution Protocol (PNRP) — provides server-less name publication and resolution over both local networks and the Internet. Applications can announce computer names, user names, and application endpoints without deploying a central service or requiring special end-host provisioning. PNRP name records can contain arbitrary application-provided data. In Windows Vista, PNRP names can be represented as regular hostnames, meaning that they can be resolved by existing applications (for example, Internet Explorer). PNRP is also integrated into P2P Contact Management, allowing applications to locate trusted contacts over the Internet and subscribe to their current presence information.

Session Initiation

P2P supports inviting users to activities and establishing end-to-end application sessions using the following steps:

  1. Register application capabilities. Upon installation, applications can register capabilities that are advertised to other users. Applications also register entry points which are invoked when an invitation has been received and accepted by the local user.

  2. Discover endpoints using a discovery service such as People Near Me or PNRP.

  3. Using the endpoints, applications can obtain a list of activities that the user can be invited to perform, and they can initiate a session invitation to the remote user. The invitation can convey application-specific data required to support establishing a secure application connection if the invitation is accepted.

  4. On the remote host, the user is presented with the invitation, and if it is accepted, the associated application is launched.

P2P also allows application invitations to be initiated from within popular instant messaging applications. The messaging application handles sending and presenting the invitation to the user, and if accepted, launches the requested application on both hosts.

Multi-Party Communication

Windows Vista and Windows Communication Foundation provide rich facilities for supporting multi-party communication. These mesh technologies handle the difficult tasks of managing multiple hosts who are participating in a collaboration session:

  • Discovery — meshes are identified by name. Using PNRP, mesh nodes automatically find and connect to each other.

  • Resilient and efficient communication — meshes automatically organize the participant hosts into a resilient communication structure and dynamically optimize communications to account for changing membership, data transmission patterns, network bandwidth, and network latency.

  • Security — meshes provide mechanisms that control membership and encrypt data. Mesh admission control are typically governed through password or individual identity certificates.

Mesh services support two styles of application development:

  • Data replication — the Grouping mesh facility in Windows Vista provides a synchronized database among mesh participants. Applications publish data records that are automatically propagated to other mesh nodes, and all nodes thereby maintain a common view of the available data.

  • Message distribution — the Peer Channel in Windows Communication Foundation provides for scalable message distribution among mesh participants. Applications publish records that are automatically disseminated to all hosts. Peer Channel also provides facilities that enable applications to control message propagation.