Date post: | 18-Dec-2014 |
Category: |
Technology |
Upload: | corehab |
View: | 2,805 times |
Download: | 2 times |
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Peer to Peer NETWORKING
David Tacconi
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
OutlineWhat is P2P:
Definitions and basicHistory
Principal P2P applicationsP2P goes mobile
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
What is P2P The term P2P refers to "peer-to-peer"
networkingA 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 interestssocial networking technology is an example of
this concept
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Definition of P2P A P2P network needs these 7 characteristics
(according to Dave Winer UserLand):1. The user interface runs outsides of a Web browser
2. computers in the system can act as both clients and servers
3. the software is easy to use and well-integrated
4. the application includes tools to support users wanting to create content or add functionality
5. the application makes connections with other users
6. the application does something new or exciting
7. the software supports "cross-network" protocols like SOAP or XML-RPC
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Definition of P2P (Ross&Rubenstein)Autonomy from central serversExploits resources at the edges of the
Internetstorage and contentCPU cycleshuman presence
Resources at edge have intermittent connectivity, being added & removed
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
P2P Applications
P2P file sharingNapster, Gnutella, Kazaa, BitTorrent,…
Instant messaging / voice over IPSkype and many others…
P2P distributed computingSeti Project
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
File Sharing Roberto runs P2P client application on his
notebook computer Intermittently connects to Internetgets new IP address for each connectionRegisters 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, FranzFile is copied from Franz’s PC to Roberto’s laptop: P2P
While Roberto downloads, other users uploading from Roberto
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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.
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Napster: how did it workApplication-level, client-server protocol over
point-to-point TCPCentralized directory serverSteps:
connect to Napster serverupload your list of files to server.give server keywords to search the full list with.select “best” of correct answers. (pings)
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Napster: the cycle1 2
3 4
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Gnutelladecentralized method of searching for files
central directory server no longer the bottleneck
more difficult to “pull plug”
each application instance serves to:store selected filesroute queries from and to its neighboring peersrespond to queries if file stored locallyserve files
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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 nodesNew node establishes neighboring relations by sending
join messages
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
KaZaaMore 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 filesautomatically switches to new download server when current server becomes unavailableprovides estimated download timesUser can configure max number of simultaneous uploads and max number of simultaneous downloadsFrom user’s perspective, service resembles Google, but provides links to MP3s and videos rather than Web pages
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
KaZaa overlay maintanceList of potential supernodes included within
software downloadNew peer goes through list until it finds
operational supernodeConnects, obtains more up-to-date list, with
200 entriesNodes in list are “close” to ONNode then pings 5 nodes on list and connects
with the oneIf supernode goes down, node obtains
updated list and chooses new supernode
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
KaZaa QueriesNode first sends query to supernodeSupernode responds with matches
If x matches found, done.
Otherwise, supernode forwards query to subset of supernodesIf total of x matches found, done.
Otherwise, query further forwardedProbably by original supernode rather than
recursively
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
KaZaa finallyKaZaa-lite is a freeware version of KaZaaLesson learned from KaZaa
KaZaA provides powerful file search and transfer service without server infrastructure
Exploit heterogeneityProvide automatic recovery for interrupted
downloadsPowerful, intuitive user interface
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
BitTorrent: file broken in pieces File is broken into pieces
Typically piece is 256 KBytesUpload pieces while downloading pieces
Piece selectionSelect rarest pieceExcept at beginning, select random pieces
Tit-for-tatBit-torrent uploads to at most four peersAmong the uploaders, upload to the four that are
downloading to you at the highest ratesA little randomness too, for probing
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Distributed P2P: DHTDHT service and issuesCARPConsistent HashingChordCANPastry/TapestryHierarchical lookup servicesTopology-centric lookup service
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
DHT in a nutshell
CAN
Pastry
Chord
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
P2P 4 VoIP: SkypeHierarchical architecture
Central login serversupernodes
Any node with a public IP address having sufficient CPU, memory and network bandwidth is a candidate to become a super nodeAn ordinary host must connect to a super node and must register itself with the Skype login server
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
Distributed computing seti@home 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
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
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 projectSeveral attempts to bring it on ad hoc networksDifficult to port it on real mobile devices
Peer2MEA j2me framework for developing mobile P2P
applicationsSimilar to U-Hopper in the basic ideas Include real file sharing
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
P2P goes mobile 2/3BEDD
Started in 2001 as commercial BT P2P
Now BT + WiFi + GPRSMore than 250000 BEDD
buddiesDownloads, chatting,
socializingU-Hopper
Well known middleware for P2P applications…
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
P2P goes mobile 3/3Difficult to export the P2P classic model to
mobile decentralized environmentDifferent operating systemsDifferent user interfaces
Incentives for file exchange needs to be found
Economic models for classical P2P can work?
Few successfull examples can be found
Create-Net, 18th March 2008Pervasive Computing and Communication Environment Group
ConclusionsHow 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?