JavaScript Editor JavaScript Editor     JavaScript Debugger 

Team LiB
Previous Section Next Section

Installing the Intel Peer-to-Peer Accelerator Kit

You can download the Intel Peer-to-Peer Accelerator Kit at the companion site for this book: This site will also post any update links for the Intel Peer-to-Peer Accelerator Kit if they become available. (Unfortunately, at the time of this writing, the Intel Peer-to-Peer Accelerator Kit is no longer available on the Microsoft-supported http://www.gotdotnet.comsite).

The Intel Peer-to-Peer Accelerator Kit download is in the form of a ZIP file with two setup applications. One allows you to install the peer-to-peer name server (used for discovery), while the other includes the Peer-to-Peer Accelerator Kit, which includes the required assemblies, documentation, and optionally, several sample applications and the source code for the toolkit (see Figure 13-4).

Click To expand
Figure 13-4: Installing the Intel Peer-to-Peer Accelerator Kit

Intel also provides white papers and a rudimentary peer-to-peer case study at

The peer-to-peer name server installs the discovery web service and discovery database. It can only be installed on a server version of Windows, such as Windows 2000 Server or Windows Server 2003. However, if you want to test on a single computer, you only need to install the Peer-to-Peer Accelerator Kit.

The Peer-to-Peer Accelerator Kit setup installs files into the [InstallDir]\Intel\ P2P\v1.0 directory. (By default, the root installation directory is C:\Program Files.) In this path are the following subdirectories:

The core namespaces and classes are as follows:

Configuring the Peer Service

You won't need to perform any additional configuration to test the Intel Peer-to-Peer Accelerator Kit. The peer service is automatically installed and configured to run on startup as part of the installation process. However, when testing peer-to-peer applications in distributed environments, you'll have to specify the discovery service to use and optionally configure a relay service.

Both of these details are configured by editing the Intel.Peer.Common. Dameon.config XML configuration file, which is found in the InstallDir]\Intel\ P2P\v1.0\Config directory.

Here's the basic outline of the configuration file sections:

<?xml version="1.0" encoding="utf-8" ?>

  <!-- Entry for the ListenerPort and LoggingLevel -->

  <!-- Entry for the Listener -->

  <!-- Entry for the Peer Name System -->

  <!-- Entry for the Secure Listener -->

  <!-- Entry for the Relay -->

  <!-- Entry for Tunnel -->

  <!-- Entry for Port Mapped data -->

  <!-- Entry for Store and Forward service -->

  <!-- Entry for FileCopyService -->


The first section allows you to configure the port that the peer service uses to listen for incoming requests. You can also configure the client certificate to use when creating secure sessions as well as a proxy address and port.

<Messaging LoggingLevel="0">


  <ClientCertificate>C:\Program Files\Intel\P2P\v1.0\data\Security\Client.cer



You can also set a logging level from 0 to 5, where 0 indicates no logging and 5 indicates the maximum number of log messages. The log messages are written to a Windows event log named PeerServices.

The secure listener entry configures the server certificate as well as the port to use for SSL communication.

<Module Name="SecureListener" Assembly="...Intel.Peer.Messaging.Services.dll"
 Load="true" Essential="true">



The peer-name system entry is where you configure the discovery service. You can use the <Cache> element to configure how many peer entries will be retained in local memory or on disk. The peer name system entry also specifies the <URL> element with the HTTP path to the .asmx web service that performs the discovery. The server name is the only part of this URL that you should need to modify, because the discovery service is installed by default as peernameservice.asmx in a virtual directory named peernameservice.

<Module Name="PeerNameSystem" Assembly="...Intel.Peer.Messaging.Services.dll"
 Load="true" Essential="true">

  <DataStore Assembly="...Intel.Peer.Messaging.Services.dll"
        <Path>C:\Program Files\Intel\P2P\v1.0\Data\NameServiceCache</Path>



Optionally, you can specify several server URLs. In this case, the peer will pass its information to every server whenever an update is performed. On lookup calls the peer will try the servers in order until a response is returned.

In addition, you can also configure the store-and-forward entry to configure how much space is allocated for messages (in megabytes) that are queued for attempted retransmission. You can set where they should be stored, how often delivery should be reattempted (in seconds), and the maximum life span a message is allowed to have (in days). The defaults allocate 10 MB of space, retry message delivery every ten minutes, and allow stored messages to last a full week on the peer.

<Module Name="StoreAndForward" Assembly="...Intel.Peer.Messaging.Services.dll"
 Load="true" Essential="true">

    <StoragePath>C:\Program Files\Intel\P2P\v1.0\Data\StoreForward</StoragePath>


Finally, the relay and tunnel elements allow you to set up firewall traversal solutions. The relay element allows you to configure a peer to act as a relay server (or "super peer") that takes additional responsibility for transmitting messages between peers that could not otherwise communicate, as shown in Figure 13-5.

Click To expand
Figure 13-5: The role of a relay server

In Figure 13-5, Peer A is unable to open a connection to Peer B. However, it can contain the relay server hosted by Peer C. If Peer B is also using Peer C, all communication can be routed through subconnections in Peer C. These are called tunneled connections, and they use the BEEP Protocol.

This is how it works, step-by-step:

  1. During startup, the listener on Peer A makes a connection to the relay service on Peer C and opens a channel using BEEP. It identifies itself to the relay using its peer name.

  2. The relay returns one or two new URLs that can be used to contact Peer B through the relay on Peer C. These URLs are also returned by the tunnel to the peer service on Peer B.

  3. When a message is sent through the relay service, it examines the path, determines which peer it's for, and then opens a channel on the peer's tunnel and relays the data.

  4. The relay continues to operate this way until the tunneling connection from the peer is closed or lost.

To configure a peer to act as a relay server, specify a port to use for receiving requests and one for tunneling connections. You must also modify the <Module> tag and set Load to true (which isn't the default).

<Module Name="Relay" Assembly="...Intel.Peer.Messaging.Services.dll"
  RelayInitializer" Load="true" Essential="false">

  <TunnelIdPath>C:\Program Files\Intel\P2P\v1.0\Data\TunnelIDs.ser</TunnelIdPath>


Once you have a relay server, you can make use of it in other peers by configuring the tunnel entry. Once again, you must set Load to true. You must also set the tunnel endpoint to the host name where the relay service is running.

<Module Name="Tunnel" Assembly="...Intel.Peer.Messaging.Services.dll"
  TunnelInitializer" Load="true" Essential="false">



Clearly, the manual configuration steps that are involved make this a less-than-perfect solution. Other firewall traversal mechanisms are defined in the Intel Peer-to-Peer Accelerator Kit architecture specification but not implemented.

Team LiB
Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor