

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















1
CS
©Ling Liu©Ling Liu
Extracted from CHORD slides, Hector Garcia-Molina [ICDE’ Keynote slides], Calton Pu Gnutella Slides
2
CS Lecture
3
CS
©Ling Liu©Ling Liu
Introduction
z P2P Vs client-server architecture
z Why P2P?
4
CS Lecture
A peer-to-peer storage problem
z 1000 scattered music enthusiasts
z Willing to store and serve replicas
z How do you find the data?
Internet
3
5
N (^1000) ……
7
CS
©Ling Liu©Ling Liu
Distributed Solution
Client
Key=“title” Value=MP3 data…
Lookup(“title”)
Flooded queries (Gnutella, Morpheus, etc.)
8
CS Lecture
Distributed Data Management
z Distribution is expensive
z If you must distribute:
use backups for reliability
use backups for reliability
9
CS
©Ling Liu©Ling Liu
Computational Efficiency is NOT Main Goal
z Main driving force in a P2P system:
10
CS Lecture
Why peer-to-peer?
Reducing:
13
CS
©Ling Liu©Ling Liu
Gnutella History
z AOL acquires Nullsoft
z Gnutella reverse-engineered and
refined
14
CS Lecture
P2P case study - Gnutella
z P2P file sharing application on top of an overlay network Nodes join network via a known peer. Nodes maintain open TCP Conn. Queries are broadcasted (flooded). Queries have a Time to live (TTL). Queries have a unique ID. When a peer receives a duplicate query, it is simply dropped.
15
CS
©Ling Liu©Ling Liu
Gnutella
query
16
CS Lecture
Current Techniques: Gnutella
= forward query = processed query
= source
= found result = forward response
Breadth-First Search (BFS)
19
CS
©Ling Liu©Ling Liu
Search Protocol
z Gnutella request by a peer A creates Search String S (Unique) Request ID N Time-to-Live T (and hops passed)
z Check local system, if not found Sends ( A, S, N, T ) to all Gnutella neighbors Flooding is not scalable
20
CS Lecture
z If you don’t have the file you want
z Stop flooding by checking
Flooding Protocol
21
CS
©Ling Liu©Ling Liu
Propagation (forwarding) Protocol
z B Receives Gnutella request (A, S, N, T). If B has already received request N or T=0, B drops this request and does nothing. z B looks up S locally, and if results found B sends (N, Result) to A. z If not found locally, B sends ( B, S, N, T-1 ) to all of its Gnutella neighbors, and it records the fact that A has made the request N z When B receives a response of the form (N, Result) from one of its neighbors, it forwards this response to A.
22
CS Lecture
Group Membership
z Join with a PING to announce self Receivers forward the PING to neighbors Receivers back-propagate a PONG to announce self: IP address, number/size of shared files
z Periodic refresher of network state PING again Well-known root nodes if starting from scratch
25
CS
©Ling Liu©Ling Liu
Some Statistics
z Network size growth in 7 months From 2K to 48K nodes
z Network instability About 40% of nodes live less then 4 hours About 25% of nodes live more than 24 hours
z Message types in June 2001 About 91% queries About 8% PING messages
26
CS Lecture
Network Diameter
27
CS
©Ling Liu©Ling Liu
Power-Law Hypothesis
z Self-organizing networks follow power-law
z Gnutella network seems more resilient
28
CS Lecture
Node Connectivity
31
CS
©Ling Liu©Ling Liu
Analysis of Gnutella
z Routing scalability
z Other issues
32
CS Lecture
P2P Challenges
z Search
z Resource Management
z Security & Privacy
33
CS
©Ling Liu©Ling Liu
P2P Search
z Develop search techniques for “loose” systems that are Efficient Simple (easy to implement, no hidden costs) Realistically and thoroughly evaluated
z Open issues: More efficient! Make intelligent use of topology, replication Take advantage of heterogeneity (e.g., super-peers)
34
CS Lecture
P2P Search: Outline
z Search Techniques Breadth First Search (BFS) Iterative Deepening (RDFS) Random Walk Probabilistic Broadening (PBBFS) z Handling Peer Heterogeneity Short-Cut Effect Structuring Overlay Topologies. z Result Caching
37
CS
©Ling Liu©Ling Liu
Results: BW Consumption
38
CS Lecture
Results: Latency
39
CS
©Ling Liu©Ling Liu
Peer Heterogeneity
z Peers by definition are equal. But, in
reality, all peers are not equal.
z Routing anomalies due to differences in network bandwidth (high speed
DSL Vs Dial-up Connection)
40
CS Lecture
Short-Cut Effect
1 2
3
4
5
6
7 A
high speed
low speed