Your SlideShare is downloading. ×
P2P Seminar
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

P2P Seminar


Published on

Published in: Technology

1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Peer to Peer NETWORKING David Tacconi
  • 2. Outline
    • What is P2P:
      • Definitions and basic
      • History
    • Principal P2P applications
    • P2P goes mobile
  • 3. What is P2P
    • The term P2P refers to "peer-to-peer" networking
    • A peer-to-peer network allows computer hardware and software to function without the need for special server device
    • "P2P" as "people-to-people“:
      • help individuals on the Internet meet each other and share common interests
      • social networking technology is an example of this concept
  • 4. Definition of P2P
    • A P2P network needs these 7 characteristics (according to Dave Winer UserLand):
      • The user interface runs outsides of a Web browser
      • computers in the system can act as both clients and servers
      • the software is easy to use and well-integrated
      • the application includes tools to support users wanting to create content or add functionality
      • the application makes connections with other users
      • the application does something new or exciting
      • the software supports "cross-network" protocols like SOAP or XML-RPC
  • 5. Definition of P2P (Ross&Rubenstein)
    • Autonomy from central servers
    • Exploits resources at the edges of the Internet
      • storage and content
      • CPU cycles
      • human presence
    • Resources at edge have intermittent connectivity, being added & removed
  • 6. P2P basic: Overlay Networks
    • Virtual edge
      • TCP connection
      • or simply a pointer to an IP address
    • Overlay maintenance
      • Periodically ping to make sure neighbor is alive
      • verify liveness while messaging
    • If neighbor goes down, may want to establish new edge
    • New node needs to bootstrap
    Overlay Edge
  • 7. P2P basic: typical problems
    • Scalability
      • Search queries
      • Download and uploads
      • Graph theory can help…
    • Free riding
      • Nodes consumes resources without sharing
    • Several works
      • analyzing factors affecting the degree of free-riding
      • finding incentive mechanisms to encourage user cooperation
      • Defining challenges in the design of incentive mechanisms for P2P systems (economic models)
    • Security issues
      • Distributed systems => easy to be attacked
    • Copyright issues
      • Mp3 and videos shared without control
  • 8. P2P Applications
    • P2P file sharing
      • Napster, Gnutella, Kazaa, BitTorrent,…
    • Instant messaging / voice over IP
      • Skype and many others…
    • P2P distributed computing
      • Seti Project
  • 9. File Sharing
    • Roberto runs P2P client application on his notebook computer
      • Intermittently connects to Internet
      • gets new IP address for each connection
      • Registers her content in P2P system
    • Asks for “Non amarmi” di A. Baldi
    • Application displays other peers that have copy of “Non amarmi”
      • Roberto chooses one of the peers, Franz
      • File is copied from Franz’s PC to Roberto’s laptop: P2P
    • While Roberto downloads, other users uploading from Roberto
  • 10. History of file sharing
    • File sharing and legacy is the main problem
    • Napster:
      • First P2P software started in 90s for mp3 file sharing
      • Big internet breakthrough in 2000
      • Sold for 8 milions $ in June 2002
      • Legal controversy; closed in September 2002
    • When Napster was shut down:
      • Napster users migrated to the Kazaa and Kazaa Lite
      • FastTrack grew to become even larger than the original Napster network.
    • Kazaa suffered from legal troubles
    • Other systems, like eDonkey/ Overnet, have continued the legacy of free P2P file sharing software.
  • 11. Napster: how did it work
    • Application-level, client-server protocol over point-to-point TCP
    • Centralized directory server
    • 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. (pings)
  • 12. Napster: the cycle 1 2 3 4
  • 13. Gnutella
    • decentralized method of searching for files
      • central directory server no longer the bottleneck
      • more difficult to “pull plug”
    • each application instance serves to:
      • store selected files
      • route queries from and to its neighboring peers
      • respond to queries if file stored locally
      • serve files
  • 14. Gnutella: how it works
    • Searching by (controlled) flooding:
      • if you don’t have the file you want, query 7 of your neighbors.
      • if they don’t have it, they contact 7 of their neighbors, for a maximum hop count of 10.
      • reverse path forwarding for responses (not files)
    • Node join:
      • New node uses bootstrap node to get IP addresses of existing Gnutella nodes
      • New node establishes neighboring relations by sending join messages
  • 15. KaZaa
    • More than 3 million up peers sharing over 3,000 terabytes of content
      • more popular than Napster ever was
      • more than 50% of Internet traffic
      • MP3s & entire albums, videos, games
    • optional parallel downloading of files
    • automatically switches to new download server when current server becomes unavailable
    • provides estimated download times
    • User can configure max number of simultaneous uploads and max number of simultaneous downloads
    • From user’s perspective, service resembles Google, but provides links to MP3s and videos rather than Web pages
  • 16. KaZaa architecture
    • Each peer is either a supernode or is assigned to a supernode
    • Nodes that have more connection bandwidth and are more available are designated as supernodes
    • Each supernode has TCP connections with 30-50 supernodes
    • Each supernode acts as a mini-Napster hub, tracking the content and IP addresses of its descendants
    • A KaZaA SN track only the content of its children
  • 17. KaZaa overlay maintance
    • List of potential supernodes included within software download
    • New peer goes through list until it finds operational supernode
      • Connects, obtains more up-to-date list, with 200 entries
      • Nodes in list are “close” to ON
      • Node then pings 5 nodes on list and connects with the one
    • If supernode goes down, node obtains updated list and chooses new supernode
  • 18. KaZaa Queries
    • Node first sends query to supernode
    • Supernode responds with matches
      • If x matches found, done.
    • Otherwise, supernode forwards query to subset of supernodes
      • If total of x matches found, done.
    • Otherwise, query further forwarded
      • Probably by original supernode rather than recursively
  • 19. KaZaa finally
    • KaZaa-lite is a freeware version of KaZaa
    • Lesson learned from KaZaa
      • KaZaA provides powerful file search and transfer service without server infrastructure
    • Exploit heterogeneity
    • Provide automatic recovery for interrupted downloads
    • Powerful, intuitive user interface
  • 20. BitTorrent
    • BitTorrent terms:
      • Leeches - People who download files but do not share files on their own computer with others
      • Seed or seeder - A computer with a complete copy of a BitTorrent file (At least one seed computer is necessary for a BitTorrent download to operate.)
      • Swarm - A group of computers simultaneously sending (uploading) or receiving (downloading) the same file
      • .torrent - A pointer file that directs your computer to the file you want to download
      • Tracker - A server that manages the BitTorrent file-transfer process
    • A node gets file.torrent info and then
    • file.torrent info:
      • length
      • name
      • hash
      • url of tracker
  • 21. BitTorrent: file broken in pieces
    • File is broken into pieces
      • Typically piece is 256 KBytes
      • Upload pieces while downloading pieces
    • Piece selection
      • Select rarest piece
      • Except at beginning, select random pieces
    • Tit-for-tat
      • Bit-torrent uploads to at most four peers
      • Among the uploaders, upload to the four that are downloading to you at the highest rates
      • A little randomness too, for probing
  • 22. BitTorrent cycle
    • Click on a link for the file you want
    • communicates with a tracker to find other computers running BitTorrent that have the complete file ( seed computers) and those with a portion of the file
    • The tracker identifies the swarm , which is the connected computers that have all of or a portion of the file and are in the process of sending or receiving it
    • Trading process:
      • your computer receives multiple pieces of the file simultaneously.
    • Keep BitTorrent client software alive:
      • your future download rates improve because you are ranked higher in the "tit-for-tat" system
  • 23. Distributed P2P: DHT
    • DHT service and issues
    • CARP
    • Consistent Hashing
    • Chord
    • CAN
    • Pastry/Tapestry
    • Hierarchical lookup services
    • Topology-centric lookup service
  • 24. DHT in a nutshell CAN Pastry Chord
  • 25. P2P 4 VoIP: Skype
    • Hierarchical architecture
      • Central login server
      • supernodes
    • Any node with a public IP address having sufficient CPU, memory and network bandwidth is a candidate to become a super node
    • An ordinary host must connect to a super node and must register itself with the Skype login server
  • 26. Skype: some details…
    • Skype search
      • Skype uses Global Index technology to search for a user
      • Skype claims that search is distributed and is guaranteed to find a user if it exists and has logged in during last 72 hours
      • Search results are observed to be cached at intermediate nodes
    • Call establishment and teardown
      • Call signaling is always carried over TCP
      • For user not present in buddy list, call placement is equal to user search plus call signaling
      • If caller is behind port-restricted NAT and callee is on public IP, signaling and media flow through an onlineSkype node which forwards signaling to callee over TCP and routes media over UDP
      • If both users are behind port-restricted NAT and UDP restricted firewall, both caller and callee SCs exchange signaling over TCP with another online Skype node, which also forwards media between caller and callee
  • 27. Distributed computing
    • [email_address]
    • Search for ET intelligence
    • Central site collects radio telescope data
    • Data is divided into work chunks of 300 Kbytes
    • User obtains client, which runs in background
    • Peer sets up TCP connection to central computer, downloads chunk
    • Peer does FFT on chunk, uploads results, gets new chunks
    • Not peer to peer, but exploits resources at network edge
  • 28. P2P goes mobile 1/3
    • JXTA for ad-hoc networks
      • Introduced by Sun Microsystems is a set of open, generalized peer-to-peer protocols that allows any connected device (cell phone to PDA, PC to server) on the network to communicate and collaborate
      • Open source project
      • Several attempts to bring it on ad hoc networks
      • Difficult to port it on real mobile devices
    • Peer2ME
      • A j2me framework for developing mobile P2P applications
      • Similar to U-Hopper in the basic ideas
      • Include real file sharing
  • 29. P2P goes mobile 2/3
    • BEDD
      • Started in 2001 as commercial BT P2P
      • Now BT + WiFi + GPRS
      • More than 250000 BEDD buddies
      • Downloads, chatting, socializing
    • U-Hopper
      • Well known middleware for P2P applications…
  • 30. P2P goes mobile 3/3
    • Difficult to export the P2P classic model to mobile decentralized environment
      • Different operating systems
      • Different user interfaces
    • Incentives for file exchange needs to be found
    • Economic models for classical P2P can work?
    • Few successfull examples can be found
  • 31. Conclusions
    • How can we use the lesson learned from classical P2P systems in extremely mobile systems?
      • From a technological prospective…
      • From an economical point of view…
    • How can we contribute in the P2P research community?