Professional Documents
Culture Documents
Peer-To-Peer Network (Week 3, Lec-7,8 and 9)
Peer-To-Peer Network (Week 3, Lec-7,8 and 9)
Peer-To-Peer Network (Week 3, Lec-7,8 and 9)
Shah Khalid
A-212
SEECS Faculty Block
Last Lecture
● Overlay Network
● Chord
○ DHT
❏ Query Flooding
❏ Gnutella
❏ Swarming
❏ BitTorrent
3
Peer-to-Peer Systems
❏ Common Primitives:
❏ Join: how to I begin participating?
4
Unstructured P2P: Napster
5
Napster -The Lookup Problem
6
Napster: How it Worked
Napster was based on a central index server
Actually a server farm
User registers with the central server
Give list of files to be shared
Central server know all the peers and files in network
7
Napster: Queries 1. Peers register with
Content index: central server, give list of
Server farm files to be shared
1.
2. Peers send queries to
1. central server which has
content index of all files
1.
3. File transfers happen
2. directly between peers
9
P2P: Napster
10
Napster: Strengths
11
Napster: Weaknesses
12
Napster: Weaknesses
Results unreliable
No guarantees about file contents (as in most P2P networks)
13
Gnutella – Unstructured P2P System
14
Gnutella – Unstructured P2P System
❏ No central server
❏ Gnutella software on your machine
❏ Need to know at least one Node on network
❏ Query distributed among all the peers
❏ TTL limit placed on query
15
Gnutella
❏ Query Flooding:
❏ Join: on startup, client contacts a few other nodes; these become its
“neighbors”
❏ Publish: no need
❏ Search: ask neighbors, who ask their neighbors, and so on... when/if
found, reply to sender.
❏ Fetch: get the file directly from peer
16
Gnutella
17
Gnutella
18
Gnutella
19
Gnutella
❏ Search - Query packet is used to search for a file on network
❏ Flood the “Query”
❏ If requested resource found, reply with “QueryHIT” to sender following
the same route
❏ Else send the ‘Query’ message to all the neighbors
❏ TTL (Time to Live) limits propagation
20
Gnutella - Packet HEADER
21
Gnutella
❏ disadvantages
❏ No guarantee of file availability
22
Gnutella VS Napster
Similarities
1. Users place the files they want to share on their hard disks and make
them available to everyone else for downloading in peer-to-peer fashion.
2. Users run a piece of Gnutella software to connect to the Gnutella network.
Differences
1. No central database
2. Many different client applications available to access the Gnutella
network……. LimeWire , Morpheus, Gnucleus and many more…
Because of both of these features, it would be difficult for a simple
court order to shut Gnutella down.
23
KaZaA
24
KaZaA
25
BitTorrent
● peer-to-peer content sharing over the Internet.
● The protocol was designed by Bram Cohen in 2001.
26
BitTorrent Terminology
27
How BITTORRNT WORKS?
28
Deployed P2P Systems --What we covered
❏ Chord
❏ Napster
❏ Gunetella
❏ Pastry
❏ Tapestry
❏ Kademlia
❏ KaZaA
❏ Bit-torrent
❏ CAN- Assignement- Explore Yourself
29
Explore Yourself!
Assignment #1
30