P2P Networks new - Information Technology Pakistan

Download Report

Transcript P2P Networks new - Information Technology Pakistan

1
ADVANCED COMPUTER NETWORKS
Peer-Peer (P2P) Networks
What is P2P?
2

“the sharing of computer resources and services by
direct exchange of information”
What is P2P?
3

Various definitions seem to agree on
 sharing
of resources
 direct communication between equals (peers)
 no centralized control
What is a peer?
4

“…an entity with capabilities similar to other
entities in the system.”
Client/Server Architecture
5



Well known, powerful,
reliable server is a data
source
Clients request data
from server
Server
Very successful model

WWW (HTTP), FTP, Web
services, etc.
Client
Client
Internet
Client
Client
Client/Server Limitations
6

Scalability is hard to achieve
Presents a single point of failure
Requires administration

P2P systems try to address these limitations


P2P Architecture
7

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 copyright protection on the
Internet”
Node
Node
Node
Internet
Node
Node
P2P Network Characteristics
8

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 wellknown servers)
P2P Applications
9

File sharing (BitTorrent, Napster, Kazaa)

Multiplayer games (Counter Strike, Unreal Tournament, DOOM)

Collaborative applications (ICQ, shared whiteboard)
Popular file sharing P2P Systems
10

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
Approaches
11


Structured
Unstructured
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
User A
centralized
directory server
1
peers
1
3
1
2
1
User B
12
Centralized model
A
B
file transfer is
decentralized, but
locating content is
highly centralized
C
D
13
Napster: how does it work
14
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.
Napster
15
1. File list is
uploaded
napster.com
users
Napster
16
2. User
requests
search at
server.
napster.com
Request
and
results
user
Napster
17
3.
napster.com
User pings
hosts that
apparently
have data.
pings
user
Napster
18
napster.com
4. User retrieves
file
Retrieves
file
user
Unstructured
19

Fully distributed



no central server
Used by KaZaa
Each peer indexes the files it makes available for sharing
(and no other files)
KaZaa: Ping flooding
File transfer:
HTTP
20
 Ping message
sent over existing TCP
connections
Query
QueryHit
 peers forward
ping message
Pong
sent over
reverse
path
Query
QueryHit
KaZaa
21




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
P2P : Skype
22
Skype clients (SC)
Supernode
(SN)
Issues with P2P
23

Free Riding
 Downloading
 On
but not sharing any data
BitTorrent
 15%
of users contribute 94% of content
 63% of users never responded to a query

No ranking: what is a trusted source?