100% found this document useful (1 vote)
2K views

P+2 Protocol: An Implementation Guide

The document describes a P+2 peer-to-peer file sharing protocol and reference implementation. Each peer maintains a list of other known peers and can search for and download content from other peers. The reference implementation includes a peer list server to manage connections between peers, a query server to handle searches, and a download server to transfer files between peers based on searches and selections from a basic user interface.

Uploaded by

hj43us
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
2K views

P+2 Protocol: An Implementation Guide

The document describes a P+2 peer-to-peer file sharing protocol and reference implementation. Each peer maintains a list of other known peers and can search for and download content from other peers. The reference implementation includes a peer list server to manage connections between peers, a query server to handle searches, and a download server to transfer files between peers based on searches and selections from a basic user interface.

Uploaded by

hj43us
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9

P+2 protocol

An implementation guide
P+2 tasks
Each peer has to maintain a list of other
known peers (peer management)
Each peer can ask other peers for certain
content (search)
Each peer can dowload content from
another peer (data transfer)
P+2 reference
implementation

user peer list


interface server
query
server
peer
management download
server

Assignment#4 Assignment#3
User interface
Query

Matches
list

Selection
of file to
download
Peer list management
Connect to other peer(P)
Send a line containing your peer id
Receive a list of peer id
The list ends when the other peer closes
the connection
Repeat the process with a new peer every
ten seconds
User interface

Just two simple questions to the user


Which string to find for on other peer’s
filenames?
Once a list of matching files is
presented, which is the file to download?
Peer list server
Once a peer connects, a single text line is
read
The line contains the caller peer id that it
is added to the local list of peers
The contents of the local list of peers is
transmitted and then connection is
closed
Query server
Caller peer transmits a single text line
containing the search string
The search string is search on the shared
folder directory
Any matching filenames are sent and
next connection is closed
Download server
Caller peer sends the filename to
download.
If the file exists on the shared folder then
the server transmit its contents
Connection is closed after the file is
transferred
A concurrent server is not required

You might also like