Upload
della-paulina-cameron
View
249
Download
3
Tags:
Embed Size (px)
Citation preview
ADVANCED COMPUTER NETWORKS
Peer-Peer (P2P) Networks
1
What is P2P?
“the sharing of computer resources and services by direct exchange of information”
2
What is P2P?
Various definitions seem to agree on sharing of resources direct communication between equals
(peers) no centralized control
3
What is a peer?
“…an entity with capabilities similar to other entities in the system.”
4
Client/Server Architecture
Well known, powerful, reliable server is a data source
Clients request data from server
Very successful model WWW (HTTP), FTP,
Web services, etc.
Server
Client
Client Client
Client
Internet
5
Client/Server Limitations
Scalability is hard to achieve Presents a single point of failure Requires administration
P2P systems try to address these limitations
6
P2P Architecture
All nodes are both clients and servers Provide and consume
data Any node can initiate a
connection
No centralized data source “The ultimate form of
democracy on the Internet”
“The ultimate threat to copy-right protection on the Internet”
Node
Node
Node Node
Node
Internet
7
P2P Network Characteristics
Clients are also servers and routers Nodes contribute content, storage, memory, CPU
Nodes are autonomous (no administrative authority)
Network is dynamic: nodes enter and leave the network “frequently”
Nodes collaborate directly with each other (not through well-known servers)
8
P2P Applications
File sharing (BitTorrent, Napster, Kazaa)
Multiplayer games (Counter Strike, Unreal Tournament, DOOM)
Collaborative applications (ICQ, shared whiteboard)
9
Popular file sharing P2P Systems
BitTorrent
Large scale sharing of files. User A makes files (music, video, etc.) on
their computer available to others User B connects to the network, searches
for files and downloads files directly from user A
Issues of copyright violation
10
Approaches
Structured Unstructured
11
Structured
original “Napster” design
- when peer connects, it informs central server: IP address content
2) User B searches for file
3) User B requests file from User A
centralizeddirectory server
peers
User B
User A
1
1
1
12
3
12
Centralized model
A B
DC
file transfer is decentralized, but locating content is highly centralized
13
Napster: how does it work
Four steps: Connect to Napster server Upload your list of files to server. Give server keywords to search the full list with. Select “best” of correct answers.
14
Napster
napster.com
users
File list is uploaded
1.
15
Napster
napster.com
user
Requestand
results
User requests search at server.
2.
16
Napster
napster.com
user
pings
User pings hosts that apparently have data.
3.
17
Napster
napster.com
user
Retrievesfile
User retrieves file
4.
18
Unstructured
Fully distributed no central server
Used by KaZaa
Each peer indexes the files it makes available for sharing (and no other files)
19
KaZaa: Ping flooding
Query
QueryHit
Query
Query
QueryHit
Query
Query
QueryHit
File transfer:HTTP
Ping messagesent over existing TCPconnections
peers forwardping message
Pong sent over reversepath
20
KaZaa
file divided into 256KB chunks.
while downloading, peer uploads chunks to other peers.
peers may come and go once peer has entire file, it may leave or remain
21
P2P : Skype
Skype clients (SC)
Supernode (SN)
22
Issues with P2P
Free Riding Downloading but not sharing any data
On BitTorrent 15% of users contribute 94% of content 63% of users never responded to a query
No ranking: what is a trusted source?
23