File Sharing
Peer to Peer File Sharing : -
users
Let us see how did it
all start
Users storing data items on their machines
Other users are interested in this data .
? ?
Hello.mp3
Britney.mp3
foo.mp3
bye.mp3
Hello.mp3
1st Generation of P2P
systems
britney.mp3 {x.imit.kth.se}
bye.mp3 {hope.sics.se}
Central Directory
hello.mp3{hope.sics.se, x.imit.kth.se
britney.mp3 {hope.sics.se}
foo.mp3
Solution: (build a {x.imit.kth.se}
central directory)
Napster….
Hope.sics.se
x.imit
.kth.s
e foo.mp3
Hello.mp3 bye.mp3 .…
Britney.mp Hello.mp .…
Basic Operations in
Napster
Join
Leave/Fail
Share (Publish/Insert)
Search (Query)
Download
The End of Napster
Since users of Napster stored copy righted
material , the service was stopped for legal
reasons .
But…. a second generation appeared…
Discussion
- Scalability
- Failure
2nd Generation Random Overlay Networks)
Distributed Directory + Distributed
(Storage
Storage + Storage +
Directory Directory
Storage +
Storage +
Directory
Main Directory
:representatives
Gnutella
Free net
Gnutella Protocol
Messages
Broadcast Messages
-Ping: initiating message (“I’m here”)
-Query: search pattern and TTL (time-to-live)
Back-Propagated Messages
- Pong: reply to a ping, contains information about the peer
-Query response: contains information about the
computer that has the needed file
Node-to-Node Messages
-GET: return the requested file
-PUSH: push the file to me
Gnutella Search
Mechanism
Steps:
• Node 2 initiates search for file A
• Sends message to all neighbors
• Neighbors forward message
• Nodes that have file A initiate a reply message
• Query reply message is backpropagated
• File download