SlideShare a Scribd company logo
1 of 26
Download to read offline
Indanil Gupta (Indy)
With:
P2P Systems
Lecture A: Introduction
P2P Systems: Lecture A : Introduction1
1-First distributed systems that seriously focused
on scalability with respect to number of nodes
2-P2P techniques abound in cloud computing
systems
3-Key-value stores (e.g., Cassandra, Riak,
Voldemort) use Chord p2p hashing
P2P Systems: Lecture A : Introduction2
• [6/99] Shawn Fanning (freshman Northeastern University) releases
Napster online music service
• [12/99] RIAA sues Napster, asking $100K per download
• [3/00] 25% University of Wisconsin traffic Napster, many universities ban it
• [00] 60M users
• [2/01] US Federal Appeals Court: users violating copyright laws, Napster is abetting this
• [9/01] Napster decides to run paid service, pay % to songwriters and music companies
• [Today] Napster protocol is open, people free to develop OpenNap clients and servers
http://opennap.sourceforge.net
• Gnutella: http://www.limewire.com (deprecated)
• Peer-to-peer working groups: http://p2p.internet2.edu
P2P Systems: Lecture A : Introduction3
• Widely-deployed P2P Systems:
1. Napster
2. Gnutella
3. Fasttrack (Kazaa, Kazaalite, Grokster)
4. BitTorrent
• P2P Systems with Provable Properties:
1. Chord
2. Pastry
3. Kelips
Indanil Gupta (Indy)
With:
P2P Systems
Lecture B: Napster
P2P Systems: Lecture B : Napster4
S
S
S
P P
P P
P P
Store a directory, i.e.,
filenames with peer pointers
napster.com
Servers
Client machines
(“Peers”)
Store their
own files
File name
PennyLane.mp3 The Beatles @
128.84.92.23:1006
Info about
Client
• Connect to a Napster server
• Upload list of music files that you want to
share
• Server maintains list of <filename,
ip_address, portnum> tuples. Server stores
no files.
P2P Systems: Lecture B : Napster5
Client (contd.)
Search
• Send server keywords to search with
• (Server searches its list with the keywords)
• Server returns a list of hosts–<ip_address, portnum>
tuples–to client
• Client pings each host in the list to find transfer rates
• Client fetches file from best host
All communication uses TCP (Transmission
Control Protocol)
• Reliable and ordered networking protocol
P2P Systems: Lecture B : Napster6
S
S
S
P P
P P
P P
napster.com
Servers
2. All servers search their lists (ternary tree algorithm)
5. Download from best host
1. Query
3. Response 4. Ping candidates
Client machines
(“Peers”) Store their
own files
Store peer pointers
for all files
P2P Systems: Lecture B : Napster7
Can be used for any p2p system
• Send an http request to well-known url for that
P2P service-http://www.myp2pservice.com
• Message routed (after lookup in DNS=Domain
Name System) to introducer, a well known
server that keeps track of some recently joined
nodes in p2p system
• Introducer initializes new peers’ neighbor table
P2P Systems: Lecture B : Napster8
• Centralized server a source of congestion
• Centralized server single point of failure
• No security: plaintext messages and passwds
• Napster.com declared to be responsible for
users ’ copyright violation
• “Indirect infringement”
• Next system: Gnutella
P2P Systems: Lecture B : Napster9
Indanil Gupta (Indy)
With:
P2P Systems
Lecture C: Gnutella
• Eliminate the servers
• Client machines search and retrieve amongst
themselves
• Clients act as servers too, called servents
• [3/00] release by AOL, immediately withdrawn, but 88K users by 3/03
• Original design underwent several modifications
P2P Systems: Lecture C : Gnutella10
P2P Systems: Lecture C : Gnutella11
P
P
P
P
P
P
P
Servents (“Peers”)
Connected in an overlay graph
(== each link is an implicit Internet path)
Also store
“peer pointers”
Store their
own files
P2P Systems: Lecture C : Gnutella12
• Gnutella routes different messages within the overlay graph
• Gnutella protocol has 5 main message types
• Query (search)
• QueryHit (response to query)
• Ping (to probe network for other peers)
• Pong (reply to ping, contains address of another peer)
• Push (used to initiate file transfer)
• We’ll go into the message structure and protocol now
• All fields except IP address are in little-endian format
• Ox12345678 stored as 0×78 in lowest address byte, then
0×56 in next higher address, and so on.
P2P Systems: Lecture C : Gnutella13
Descriptor ID Payload Descriptor TTL Hops Payload Length
PayloadDescriptor Header
0 15 16 17 18 22
ID of this
search
transaction
Type of
payload 0×00
Ping
0×01 Pong
0×40 Push
0×80 Query
0×81 Queryhit
Decremented
at each hop,
Message
dropped when
ttl=0 ttl_initial
usually 7 to 10
Incremented
at each hop
Number of bytes
of message
following this
header
P2P Systems: Lecture C : Gnutella14
Minimum speed Search criteria (keywords)
Query (0×80)
0 1
Payload Format in Gnutella Query Message
P2P Systems: Lecture C : Gnutella15
Query’s flooded
out, ttl-restricted,
forwarded only
once P
P
P
P
P
P
P
TTL= 2
P2P Systems: Lecture C : Gnutella16
• To avoid duplicate transmissions, each peer maintains a list
of recently received messages.
• Query forwarded to all neighbors except peer from which received.
• Each Query (identified by DescriptorID) forwarded only once.
• QueryHit routed back only to peer from which Query received.
with same DescriptorID.
• Duplicates with same DescriptorID and Payload descriptor
(msg type) are dropped.
• QueryHit with DescriptorID for which Query not seen is dropped.
P2P Systems: Lecture C : Gnutella17
•Requestor chooses “best” QueryHit responder
Initiates HTTP request directly to responder’s ip+port
GET /get/<File Index>/<File Name>/HTTP/1.0rn
Connection: Keep-Alivern Range: bytes=0-rn User-Agent:
Gnutellarn rn
• Responder then replies with file packets after this message:
HTTP 200 OKrn
Server: Gnutellarn
Content-type:application/binaryrn
Content-length: 1024 rn
rn
P2P Systems: Lecture C : Gnutella18
HTTP is the file transfer protocol. Why?
• Because it’s standard, well-debugged, and
widely used.
• Why the “range” field in the GET request?
• To support partial file transfers.
• What if responder is behind firewall that disallows incoming
connections?
P2P Systems: Lecture C : Gnutella19
• Responder establishes a TCP connection at ip_address,
port specified. Sends
GIV <File Index>:<Servent Identifier>/<File Name>nn
• Requestor then sends GET to responder (as before) and file is
transferred as explained earlier
• What if requestor is behind firewall too?
• Gnutella gives up
• Can you think of an alternative solution?
P2P Systems: Lecture C : Gnutella20
Ping (0×00)
no payload
Pong (0×01)
Port ip_address. Num. files shared. Num. KB shared
• Peers initiate Ping’s periodically
• Ping’s flooded out like Query’s, Pong’s routed along reverse
path like QueryHit’s
• To keep neighbor lists fresh in spite of peers joining, leaving and failing
P2P Systems: Lecture C : Gnutella21
• No servers
• Peers/servents maintain “neighbors,” this forms an
overlay graph
• Peers store their own files
• Queries flooded out, ttl restricted
• QueryHit (replies) reverse path routed
• Supports file transfer through firewalls
• Periodic ping-pong to continuously refresh neighbor lists
• List size specified by user at peer: heterogeneity means some
peers may have more neighbors
P2P Systems: Lecture C : Gnutella22
• Ping/Pong constituted 50% traffic
• Solution: Multiplex, cache and reduce frequency
of pings/pongs
• Repeated searches with same keywords
• Solution: Cache Query, QueryHit messages
• Modem-connected hosts do not have enough
bandwidth for passing Gnutella traffic
• Solution: use a central server to act as proxy for such peers
• Another solution: FastTrack System (soon)
P2P Systems: Lecture C : Gnutella23
• Large number of freeloaders
• 70% of users in 2000 were freeloaders
• Only download files, never upload own files
• Flooding causes excessive traffic
• Is there some way of maintaining meta-information about peers that
leads to more intelligent routing?
• Structured peer-to-peer systems e.g., Chord System (coming up soon)

More Related Content

What's hot

Malware detection-using-machine-learning
Malware detection-using-machine-learningMalware detection-using-machine-learning
Malware detection-using-machine-learningSecurity Bootcamp
 
Network and System Administration chapter 2
Network and System Administration chapter 2Network and System Administration chapter 2
Network and System Administration chapter 2IgguuMuude
 
Introduction and history of linux
Introduction and history of linuxIntroduction and history of linux
Introduction and history of linuxSHUBHA CHATURVEDI
 
Tutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slidesTutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slidesVinayagam D
 
Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basicf114n
 
Data Loss and Duplication in Kafka
Data Loss and Duplication in KafkaData Loss and Duplication in Kafka
Data Loss and Duplication in KafkaJayesh Thakrar
 
Enumeration and system hacking
Enumeration and system hackingEnumeration and system hacking
Enumeration and system hackingbegmohsin
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
Apache Kafka Fundamentals for Architects, Admins and Developers
Apache Kafka Fundamentals for Architects, Admins and DevelopersApache Kafka Fundamentals for Architects, Admins and Developers
Apache Kafka Fundamentals for Architects, Admins and Developersconfluent
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaJeff Holoman
 
Dynamic system development method
Dynamic system development methodDynamic system development method
Dynamic system development methodNisak Ahamed
 
Open Canary - novahackers
Open Canary - novahackersOpen Canary - novahackers
Open Canary - novahackersChris Gates
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopSetor Amuzu
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network servicesUc Man
 
Agile Methods - course notes
Agile Methods - course notesAgile Methods - course notes
Agile Methods - course notesEvan Leybourn
 

What's hot (20)

Malware detection-using-machine-learning
Malware detection-using-machine-learningMalware detection-using-machine-learning
Malware detection-using-machine-learning
 
Network and System Administration chapter 2
Network and System Administration chapter 2Network and System Administration chapter 2
Network and System Administration chapter 2
 
Introduction and history of linux
Introduction and history of linuxIntroduction and history of linux
Introduction and history of linux
 
Tutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slidesTutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slides
 
Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basic
 
Data Loss and Duplication in Kafka
Data Loss and Duplication in KafkaData Loss and Duplication in Kafka
Data Loss and Duplication in Kafka
 
Honeypots
HoneypotsHoneypots
Honeypots
 
Enumeration and system hacking
Enumeration and system hackingEnumeration and system hacking
Enumeration and system hacking
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Apache Kafka Fundamentals for Architects, Admins and Developers
Apache Kafka Fundamentals for Architects, Admins and DevelopersApache Kafka Fundamentals for Architects, Admins and Developers
Apache Kafka Fundamentals for Architects, Admins and Developers
 
Basic malware analysis
Basic malware analysisBasic malware analysis
Basic malware analysis
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Dynamic system development method
Dynamic system development methodDynamic system development method
Dynamic system development method
 
Open Canary - novahackers
Open Canary - novahackersOpen Canary - novahackers
Open Canary - novahackers
 
Introduction to Ubuntu
Introduction to UbuntuIntroduction to Ubuntu
Introduction to Ubuntu
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics Workshop
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 
Agile Methods - course notes
Agile Methods - course notesAgile Methods - course notes
Agile Methods - course notes
 

Similar to Cloud Computing Concepts - Peer to peer systems- Napster - Gnutella

P2P Seminar
P2P SeminarP2P Seminar
P2P SeminarCoRehab
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferenceCengage Learning
 
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand Streaming
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand StreamingTalk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand Streaming
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand StreamingSameera Horawalavithana
 
Peerto Peer Networks
Peerto Peer NetworksPeerto Peer Networks
Peerto Peer Networkssanjoysanyal
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFSIoannis Psaras
 
Peer to peer Paradigms
Peer to peer ParadigmsPeer to peer Paradigms
Peer to peer Paradigmshassan ahmed
 
Agents and P2P Networks
Agents and P2P NetworksAgents and P2P Networks
Agents and P2P NetworksJames Salter
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewbrouer
 
Lecture 2 -_understanding_networks_2013
Lecture 2 -_understanding_networks_2013Lecture 2 -_understanding_networks_2013
Lecture 2 -_understanding_networks_2013Travis Leong Ping
 
networking and computer security prasantation
networking  and computer  security  prasantationnetworking  and computer  security  prasantation
networking and computer security prasantationDasharathChaudhary3
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- finalTaymoor Nazmy
 
Faster Content Distribution with Content Addressable NDN Repository
Faster Content Distribution with Content Addressable NDN RepositoryFaster Content Distribution with Content Addressable NDN Repository
Faster Content Distribution with Content Addressable NDN RepositoryShi Junxiao
 

Similar to Cloud Computing Concepts - Peer to peer systems- Napster - Gnutella (20)

ppt
pptppt
ppt
 
P2P Seminar
P2P SeminarP2P Seminar
P2P Seminar
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
 
P2P Lecture.ppt
P2P Lecture.pptP2P Lecture.ppt
P2P Lecture.ppt
 
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand Streaming
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand StreamingTalk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand Streaming
Talk on Spotify: Large Scale, Low Latency, P2P Music-on-Demand Streaming
 
Peerto Peer Networks
Peerto Peer NetworksPeerto Peer Networks
Peerto Peer Networks
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFS
 
Peer to peer Paradigms
Peer to peer ParadigmsPeer to peer Paradigms
Peer to peer Paradigms
 
Agents and P2P Networks
Agents and P2P NetworksAgents and P2P Networks
Agents and P2P Networks
 
Chapter 3 footprinting
Chapter 3 footprintingChapter 3 footprinting
Chapter 3 footprinting
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of view
 
Lecture 2 -_understanding_networks_2013
Lecture 2 -_understanding_networks_2013Lecture 2 -_understanding_networks_2013
Lecture 2 -_understanding_networks_2013
 
networking and computer security prasantation
networking  and computer  security  prasantationnetworking  and computer  security  prasantation
networking and computer security prasantation
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- final
 
chapter 2 architecture
chapter 2 architecturechapter 2 architecture
chapter 2 architecture
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Faster Content Distribution with Content Addressable NDN Repository
Faster Content Distribution with Content Addressable NDN RepositoryFaster Content Distribution with Content Addressable NDN Repository
Faster Content Distribution with Content Addressable NDN Repository
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Cloud Computing Concepts - Peer to peer systems- Napster - Gnutella

  • 1. Indanil Gupta (Indy) With: P2P Systems Lecture A: Introduction
  • 2. P2P Systems: Lecture A : Introduction1 1-First distributed systems that seriously focused on scalability with respect to number of nodes 2-P2P techniques abound in cloud computing systems 3-Key-value stores (e.g., Cassandra, Riak, Voldemort) use Chord p2p hashing
  • 3. P2P Systems: Lecture A : Introduction2 • [6/99] Shawn Fanning (freshman Northeastern University) releases Napster online music service • [12/99] RIAA sues Napster, asking $100K per download • [3/00] 25% University of Wisconsin traffic Napster, many universities ban it • [00] 60M users • [2/01] US Federal Appeals Court: users violating copyright laws, Napster is abetting this • [9/01] Napster decides to run paid service, pay % to songwriters and music companies • [Today] Napster protocol is open, people free to develop OpenNap clients and servers http://opennap.sourceforge.net • Gnutella: http://www.limewire.com (deprecated) • Peer-to-peer working groups: http://p2p.internet2.edu
  • 4. P2P Systems: Lecture A : Introduction3 • Widely-deployed P2P Systems: 1. Napster 2. Gnutella 3. Fasttrack (Kazaa, Kazaalite, Grokster) 4. BitTorrent • P2P Systems with Provable Properties: 1. Chord 2. Pastry 3. Kelips
  • 5. Indanil Gupta (Indy) With: P2P Systems Lecture B: Napster
  • 6. P2P Systems: Lecture B : Napster4 S S S P P P P P P Store a directory, i.e., filenames with peer pointers napster.com Servers Client machines (“Peers”) Store their own files File name PennyLane.mp3 The Beatles @ 128.84.92.23:1006 Info about
  • 7. Client • Connect to a Napster server • Upload list of music files that you want to share • Server maintains list of <filename, ip_address, portnum> tuples. Server stores no files. P2P Systems: Lecture B : Napster5
  • 8. Client (contd.) Search • Send server keywords to search with • (Server searches its list with the keywords) • Server returns a list of hosts–<ip_address, portnum> tuples–to client • Client pings each host in the list to find transfer rates • Client fetches file from best host All communication uses TCP (Transmission Control Protocol) • Reliable and ordered networking protocol P2P Systems: Lecture B : Napster6
  • 9. S S S P P P P P P napster.com Servers 2. All servers search their lists (ternary tree algorithm) 5. Download from best host 1. Query 3. Response 4. Ping candidates Client machines (“Peers”) Store their own files Store peer pointers for all files P2P Systems: Lecture B : Napster7
  • 10. Can be used for any p2p system • Send an http request to well-known url for that P2P service-http://www.myp2pservice.com • Message routed (after lookup in DNS=Domain Name System) to introducer, a well known server that keeps track of some recently joined nodes in p2p system • Introducer initializes new peers’ neighbor table P2P Systems: Lecture B : Napster8
  • 11. • Centralized server a source of congestion • Centralized server single point of failure • No security: plaintext messages and passwds • Napster.com declared to be responsible for users ’ copyright violation • “Indirect infringement” • Next system: Gnutella P2P Systems: Lecture B : Napster9
  • 12. Indanil Gupta (Indy) With: P2P Systems Lecture C: Gnutella
  • 13. • Eliminate the servers • Client machines search and retrieve amongst themselves • Clients act as servers too, called servents • [3/00] release by AOL, immediately withdrawn, but 88K users by 3/03 • Original design underwent several modifications P2P Systems: Lecture C : Gnutella10
  • 14. P2P Systems: Lecture C : Gnutella11 P P P P P P P Servents (“Peers”) Connected in an overlay graph (== each link is an implicit Internet path) Also store “peer pointers” Store their own files
  • 15. P2P Systems: Lecture C : Gnutella12 • Gnutella routes different messages within the overlay graph • Gnutella protocol has 5 main message types • Query (search) • QueryHit (response to query) • Ping (to probe network for other peers) • Pong (reply to ping, contains address of another peer) • Push (used to initiate file transfer) • We’ll go into the message structure and protocol now • All fields except IP address are in little-endian format • Ox12345678 stored as 0×78 in lowest address byte, then 0×56 in next higher address, and so on.
  • 16. P2P Systems: Lecture C : Gnutella13 Descriptor ID Payload Descriptor TTL Hops Payload Length PayloadDescriptor Header 0 15 16 17 18 22 ID of this search transaction Type of payload 0×00 Ping 0×01 Pong 0×40 Push 0×80 Query 0×81 Queryhit Decremented at each hop, Message dropped when ttl=0 ttl_initial usually 7 to 10 Incremented at each hop Number of bytes of message following this header
  • 17. P2P Systems: Lecture C : Gnutella14 Minimum speed Search criteria (keywords) Query (0×80) 0 1 Payload Format in Gnutella Query Message
  • 18. P2P Systems: Lecture C : Gnutella15 Query’s flooded out, ttl-restricted, forwarded only once P P P P P P P TTL= 2
  • 19. P2P Systems: Lecture C : Gnutella16 • To avoid duplicate transmissions, each peer maintains a list of recently received messages. • Query forwarded to all neighbors except peer from which received. • Each Query (identified by DescriptorID) forwarded only once. • QueryHit routed back only to peer from which Query received. with same DescriptorID. • Duplicates with same DescriptorID and Payload descriptor (msg type) are dropped. • QueryHit with DescriptorID for which Query not seen is dropped.
  • 20. P2P Systems: Lecture C : Gnutella17 •Requestor chooses “best” QueryHit responder Initiates HTTP request directly to responder’s ip+port GET /get/<File Index>/<File Name>/HTTP/1.0rn Connection: Keep-Alivern Range: bytes=0-rn User-Agent: Gnutellarn rn • Responder then replies with file packets after this message: HTTP 200 OKrn Server: Gnutellarn Content-type:application/binaryrn Content-length: 1024 rn rn
  • 21. P2P Systems: Lecture C : Gnutella18 HTTP is the file transfer protocol. Why? • Because it’s standard, well-debugged, and widely used. • Why the “range” field in the GET request? • To support partial file transfers. • What if responder is behind firewall that disallows incoming connections?
  • 22. P2P Systems: Lecture C : Gnutella19 • Responder establishes a TCP connection at ip_address, port specified. Sends GIV <File Index>:<Servent Identifier>/<File Name>nn • Requestor then sends GET to responder (as before) and file is transferred as explained earlier • What if requestor is behind firewall too? • Gnutella gives up • Can you think of an alternative solution?
  • 23. P2P Systems: Lecture C : Gnutella20 Ping (0×00) no payload Pong (0×01) Port ip_address. Num. files shared. Num. KB shared • Peers initiate Ping’s periodically • Ping’s flooded out like Query’s, Pong’s routed along reverse path like QueryHit’s • To keep neighbor lists fresh in spite of peers joining, leaving and failing
  • 24. P2P Systems: Lecture C : Gnutella21 • No servers • Peers/servents maintain “neighbors,” this forms an overlay graph • Peers store their own files • Queries flooded out, ttl restricted • QueryHit (replies) reverse path routed • Supports file transfer through firewalls • Periodic ping-pong to continuously refresh neighbor lists • List size specified by user at peer: heterogeneity means some peers may have more neighbors
  • 25. P2P Systems: Lecture C : Gnutella22 • Ping/Pong constituted 50% traffic • Solution: Multiplex, cache and reduce frequency of pings/pongs • Repeated searches with same keywords • Solution: Cache Query, QueryHit messages • Modem-connected hosts do not have enough bandwidth for passing Gnutella traffic • Solution: use a central server to act as proxy for such peers • Another solution: FastTrack System (soon)
  • 26. P2P Systems: Lecture C : Gnutella23 • Large number of freeloaders • 70% of users in 2000 were freeloaders • Only download files, never upload own files • Flooding causes excessive traffic • Is there some way of maintaining meta-information about peers that leads to more intelligent routing? • Structured peer-to-peer systems e.g., Chord System (coming up soon)