file
DESCRIPTION
TRANSCRIPT
112/04/08 1
P2P On-DemandVideo Streaming and Caching
丁建文
高雄應用科大資管系
112/04/082
OutlineOutline
Motivation IntroductionOn-Demand Streaming and CachingConclusions
112/04/083
Motivation (1) Motivation (1)
Different approaches for video streaming Client/Server architecture
• IP-Unicast solution– Non scalable
• IP-Multicast solution– Most ISPs do not support
CDN architecture• Replicate servers + multiple proxies
– Too expensive P2P architecture
• AP-level multicast– Scalable and cheap– Unstable
Hybrid architecture• CDN+P2P
112/04/084
Client-Server Streaming ArchitectureClient-Server Streaming Architecture
Yiu, W.-Pk.; Xing Jin; Chan, S.-H.G., "Challenges and Approaches in Large-Scale P2P Media Streaming," Multimedia, IEEE , vol.14, no.2, pp.50-59, April-June 2007
112/04/085
CDN-Based Streaming ArchitectureCDN-Based Streaming Architecture
Yiu, W.-Pk.; Xing Jin; Chan, S.-H.G., "Challenges and Approaches in Large-Scale P2P Media Streaming," Multimedia, IEEE , vol.14, no.2, pp.50-59, April-June 2007
112/04/086
P2P Streaming ArchitectureP2P Streaming Architecture
Yiu, W.-Pk.; Xing Jin; Chan, S.-H.G., "Challenges and Approaches in Large-Scale P2P Media Streaming," Multimedia, IEEE , vol.14, no.2, pp.50-59, April-June 2007
112/04/087
Motivation (2)Motivation (2)
Advantages of P2P streaming Huge storage
• Each user contribute some storage space• # of users may be 1000, 10,000, 100,000, …
Huge bandwidth• Each user contribute some forwarding bandwidth• # of users may be 1000, 10,000, 100,000, …
Very light load on server Distributed load on network
112/04/088
OutlineOutline
Motivation IntroductionOn-Demand Streaming and CachingConclusions
112/04/089
IntroductionIntroduction
P2P streaming is very popular nowFamous examples:
PPLive• http://www.pplive.com/
PPStream• http://www.ppstream.com/
112/04/0810
IntroductionIntroduction
Types of P2P streaming Live P2P streaming
• Example: traditional TV channel, live sport event• Many users share a stream• Less challenge
On-demand P2P streaming• Example: Movie-on-demand• Each user is allocated a stream• More challenge
112/04/0811
112/04/0812
112/04/0813
Two Main Design Issues Two Main Design Issues
How to locate peers?How to deliver data to peers?
112/04/0814
How to locate peers?How to locate peers?
Centralized search Hierarchical search Flooding-based searchDHT-based search
112/04/0815
How to locate peers?How to locate peers?
Centralized Approach
Yiu, W.-Pk.; Xing Jin; Chan, S.-H.G., "Challenges and Approaches in Large-Scale P2P Media Streaming," Multimedia, IEEE , vol.14, no.2, pp.50-59, April-June 2007
Examples:
PPStream, PPLive
112/04/0816
How to locate peers?How to locate peers?
Hierarchical Search Zigzag, Nice, P2Cast, P2VoD
Tran, D.A.; Hua, K.A.; Do, T.T., "A peer-to-peer architecture for media streaming," Selected Areas in Communications, IEEE Journal on , vol.22, no.1, pp. 121-133, Jan. 2004
112/04/0817
How to locate peers?How to locate peers?
Hierarchical Search – Zigzag Zigzag organizes receivers into a hierarchy of
clusters A cluster has a head and an associate head
• Head is responsible for monitoring the memberships of the cluster
• Associate-head is responsible for transmitting the content to cluster members.
• The failure of the head does not affect the service continuity of other members
• Or in case the associate-head departs, the head is still working and can designate a new associate-head quickly
112/04/0818
How to locate peers?How to locate peers?
Hierarchical Search – Zigzag A peer X do the following when receiving a joining request from
a new client
D(Y): delay between server and Yd(Y,P): delay between Y and P
Tran, D.A.; Hua, K.A.; Do, T.T., "A peer-to-peer architecture for media streaming," Selected Areas in Communications, IEEE Journal on , vol.22, no.1, pp. 121-133, Jan. 2004
By doing so, nearby peers are grouped together, making the data transmission based on that structure efficient!
112/04/0819
How to locate peers?How to locate peers?
Flooding-Based Approach (1)Example:
• GnuStream
Gnutella Protocol: 1. Query message
sent over existing TCP connections
2. Peers forwardquery message
3. The query message is associated with a time-to-live (TTL) value.
4. QueryHit sent over reverse path Computer Networking: A Top Down Approach, 4th edition.
Jim Kurose, Keith Ross, Addison-Wesley, July 2007.
112/04/0820
How to locate peers?How to locate peers?
Flooding-Based Approach (2)
Problems with GnuStream:• Depending on the degree
of connectivity among peers, the flooding of queries can generate a lot of network traffic.
• Objects located out of the search scope (which the TTL determines) wouldn’t be found in the system.
Computer Networking: A Top Down Approach, 4th edition. Jim Kurose, Keith Ross, Addison-Wesley, July 2007.
112/04/0821
How to locate peers?How to locate peers?
DHT-Based Approach Each peer is assigned a peer ID by hashing
its own IP address using a common known hash function such as SHA-1,17
Each object is assigned a object ID in the same space of peer IDs by hashing the object itself.
The peer with an ID equal to the hashed object ID is responsible for storing the object’s location (or the actual object)
112/04/0822
DHT API: Get(), Remove(), Put()DHT API: Get(), Remove(), Put()
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0823
P2P-ChordP2P-Chord
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0824
How to locate peers?How to locate peers?
Comment on DHT-based search Pros:
• Use well-developed DHT protocols, which are scalable and offer good load balancing.
• Famous protocols: Chord, Pastry, CAN
Cons:• DHT search do not consider the physical location
or bandwidth of target peers
112/04/0825
How to Construct Delivery Paths?How to Construct Delivery Paths?
Design Issues: Real-time delivery
• P2P relay incurs long delay
Sufficient-bandwidth delivery• Asymmetric upload/download bandwidth
Failure recovery of peers • Frequent peer join/leave
Load imposed on network• P2P relay incurs more traffic
112/04/0826
How to Construct Delivery Paths?How to Construct Delivery Paths?
IP routing use physical network Physical topology Neighbors are connected by
routers/switches/hubs P2P routing use overlay network
Logical topology is built on physical topology Neighbors are connected by TCP/UDP
connections
112/04/0827
Overlay Network is Not EfficientOverlay Network is Not Efficient
PLS (Physical Link Stress) # of identical packets sent over a physical link
RDP (Relative Delay Penalty) For two hosts, RDP = overlay delay/unicast
delayDifferent P2P schemes have different
PLS and RDP
112/04/0828
PLS Example (1/3)PLS Example (1/3)
Avg. PLS of IP Multicast
= PLS(A-R1)+
PLS(R1-B)+
PLS(R1-R2)+
PLS(R2-C)+
PLS(R2-D)
= (1+1+1+1+1)/5
= 1
Yang-hua Chu; Rao, S.G.; Seshan, S.; Hui Zhang, "A case for end system multicast," Selected Areas in Communications, IEEE Journal on , vol.20, no.8, pp. 1456-1471, Oct 2002
112/04/0829
PLS Example (2/3)PLS Example (2/3)
Avg. PLS of IP Unicast
= PLS(A-R1)+
PLS(R1-B)+
PLS(R1-R2)+
PLS(R2-C)+
PLS(R2-D)
= (3+1+2+1+1)/5
= 1.6 (60% higher stress)
Yang-hua Chu; Rao, S.G.; Seshan, S.; Hui Zhang, "A case for end system multicast," Selected Areas in Communications, IEEE Journal on , vol.20, no.8, pp. 1456-1471, Oct 2002
112/04/0830
PLS Example (3/3)PLS Example (3/3)
Avg. PLS of P2P Overlay
= PLS(A-R1)+
PLS(R1-B)+
PLS(R1-R2)+
PLS(R2-C)+
PLS(R2-D)
= (2+1+1+2+1)/5
= 1.4 (40% higher)
Yang-hua Chu; Rao, S.G.; Seshan, S.; Hui Zhang, "A case for end system multicast," Selected Areas in Communications, IEEE Journal on , vol.20, no.8, pp. 1456-1471, Oct 2002
112/04/0831
RDP Example RDP Example
RDP of P2P Overlay
RDP(A-B) = 27/27 = 1
RDP(A-C) = 3/3 = 1
RDP(A-D) = 29/27 = 1.074
Yang-hua Chu; Rao, S.G.; Seshan, S.; Hui Zhang, "A case for end system multicast," Selected Areas in Communications, IEEE Journal on , vol.20, no.8, pp. 1456-1471, Oct 2002
112/04/0832
Topology of Overlay NetworkTopology of Overlay Network
Single multicast treeMultiple multicast treeMesh Yiu, W.-Pk.; Xing Jin; Chan, S.-H.G., “Challenges and Approaches in Large-
Scale P2P Media Streaming”, IEEE Multimedia, Vol. 14, No.2, 2007.
112/04/0833
Overlay Topology (1/3)Overlay Topology (1/3)
Single Tree Topology Appraoch
• Each peer has fixed single parent Advantage
• Easy to optimize a single tree– Example: delay + bandwidth
• Easy to implement Disadvantage
• Unbalanced load– Few heavy-loaded interior nodes vs. many light-loaded leaf
nodes • Not robust
– Each peer connects to its only parent node via a single link Example
• NICE, Zigzag, Overcast, …
112/04/0834
Overlay Topology (2/3)Overlay Topology (2/3)
Multiple Tree Topology Appraoch
• Each peer has fixed multiple parents Advantage
• More balanced load & more robust– Multiple paths + layered video– Multiple paths + MDC-based video– Interior-node-disjoint trees: a node can be an interior node in at
most one tree Disadvantage
• Difficult to optimize multiple trees at the same time• Difficult to implement
– Synchronization between multiple parents Example
• SplitStream, CoopNet, …
112/04/0835
Overlay Topology (3/3)Overlay Topology (3/3)
Mesh Topology Appraoch
• Each peer has dynamic multiple parents due to (1) Unpredictable online/offline of peers(2) Time-variable bandwidth and packet-loss rate of the Internet
Advantage• Most balanced load• Most robust
Disadvantage • Difficult to manage
– Synchronization between peers– Real-time Internet behavior measurement
Example• GnuStream, CoolStreaming, …
112/04/0836
OutlineOutline
Motivation IntroductionOn-Demand Streaming and CachingConclusions
112/04/0837
Prominent P2P On-Demand Streaming ProtocolProminent P2P On-Demand Streaming Protocol
P2Cast 2003, University of Massachusetts, USA
P2VoD 2004, University of Central Florida, USA
DCS 2005, Huazhong University of Science and
Technology, ChinaVMesh
2007, Hong Kong University of Science and Technology, China
112/04/0838
P2P VoD: P2CastP2P VoD: P2Cast
Session Base tree Base stream Patch stream
Y. Guo, K. Suh, J. Kurose, D. Towsley, “P2Cast: P2P Patching Schemefor VoD Service,” in WWW 2003.
Snapshot at time 40
T=10
112/04/0839
P2Cast - New Client (X) AdmissionP2Cast - New Client (X) Admission
If new client X belongs to an already existing session (S) (1) X tries to join S’s base tree (2) X tries select a patch server in S or the
server If (1) & (2) is successful, X is admitted
• Else, X will be rejected
Else, X starts a new session The server streams the entire video to X
112/04/0840
P2Cast - Base Tree Construction (1/2)P2Cast - Base Tree Construction (1/2)
Design principles Bandwidth first principle Local information only principle
• Information about this node itself, its parent node, and its child nodes
112/04/0841
P2Cast - Base Tree Construction (2/2)P2Cast - Base Tree Construction (2/2)
1. New client X contacts a candidate parent P Default parent = server
2. P estimates bandwidth B(P, X) 3. All children Ci of P estimate bandwidth B(Ci, X)
4. P identifies Cmax with largest B(Ci,X)
If B(P, N) > B(Cmax, N) then• P provides base/patch stream or one of them (patch stream
has higher priority)
• If P cannot fully fulfill, then redirect X to Cmax, starting from step 1.
If B(P, N) <= B(Cmax, N) then• X is re-directed to Cmax, starting from step 1
112/04/0842
P2Cast - Patch Server SelectionP2Cast - Patch Server Selection
The patch server selection process for a client X is identical to X’s base tree joining process
Y. Guo, K. Suh, J. Kurose, D. Towsley, “P2Cast: P2P Patching Schemefor VoD Service,” in WWW 2003.
112/04/0843
P2Cast - Failure Recovery (1/2)P2Cast - Failure Recovery (1/2)
Network Problem: If incoming traffic is low (base or patch stream)
• Client A sends TEST_ERROR message to parent P
then P responds A• (1) No response
– A contacts the server and initiates the failure recovery process
• (2) Poor traffic condition– A contacts the server and initiates the failure recovery process
• (3) WAIT– P is still in its own recovery process
– A sets up a timer
112/04/0844
P2Cast - Failure Recovery (2/2)P2Cast - Failure Recovery (2/2)
Client Departure Problem Early leaving parent B sends
DEPART_RECOVER message to all clients Ci, i=1, 2, …
Ci initiate the recovery process
Failure recovery process Base stream recovery
• Identical to a new client joining the base tree
Patch stream recovery• Identical to path server selection process
112/04/0845
P2P VoD – P2VoDP2P VoD – P2VoD
Do, T.T.; Hua, K.A.; Tantaoui, M.A., "P2VoD: providing fault tolerant video-on-demand streaming in peer-to-peer environment," Communications, 2004 IEEE International Conference on , vol.3, no., pp. 1467-1472 Vol.3, 20-24 June 2004
A video session
(snapshot at time 36)
112/04/0846
P2VoD vs. P2CastP2VoD vs. P2Cast
Streaming and caching (CBR) P2VoD
• Cache the most recent content• A peer X can serve clients whose joining time is in the range of [tjX, tjX +abX]• tjX: joining time of X• abX: actual buffer size (display time) of X• Use one relay stream
P2Cast• Cache the initial part• Use two streams: base/patch streams
Failure Recovery P2VoD
• Handled locally, most of the times without involvement of the source P2Cast
• Get the source involved• Vulnerable to disruption due to server bottleneck• Resulting in long blocking time
112/04/0847
P2VoD - Joining Algorithm (1/2)P2VoD - Joining Algorithm (1/2)
If all of the existing video sessions are closed A new video session is created, and new client X is
the first member of G1 of that video session
Else, X will try to join existing video session 1. X contacts a random member of the youngest
generation Gy, and acquires the list of peers at Gy-1
2. If the first block expiring time tGy-1exp > joining time
of X, go to step 3; else go to step 4. 3. X becomes a member of Gy
4. X is the first member of Gy+1 of that video session
112/04/0848
P2VoD - Joining Algorithm (2/2)P2VoD - Joining Algorithm (2/2)
Introducing system parameter K To limit the maximum number of clients
allowed in G1 of each video session
Parent selection: heuristic solutions Round Robin: the shortest serving time Smallest Delay: bandwidth-enough, discover-
first
112/04/0849
P2VoD – DCS (Distributed Cache Service)P2VoD – DCS (Distributed Cache Service)
DSC is a DHT-Based P2P On-Demand Streaming Protocol
Zuoning Yin; Hai Jin, "DHT Based Collaborative Multimedia Streaming and Caching Service," TENCON 2005 2005 IEEE Region 10 , vol., no., pp.1-6, Nov. 2005
112/04/0850
DCS - The Roles of PeersDCS - The Roles of Peers
Rendezvous Peer (RP) Its id is closest to the hash result of the video’s name
and the Unit’s location in the video Preserving the location information of all the
segments of its corresponding Unit Root
Id is closest to the hash result of the movie name preserving the global information of the movie
Ordinary Peers are peers neither RP nor Root
112/04/0851
DHT Example: Pastry Routing TableDHT Example: Pastry Routing Table
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0852
Pastry Routing Table - Leaf SetPastry Routing Table - Leaf Set
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0853
Pastry Routing Table – Neighborhood SetPastry Routing Table – Neighborhood Set
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0854
Pastry - RoutingPastry - Routing
Eng Keong Lua et al., "A survey and comparison of peer-to-peer overlay network schemes," Communications Surveys & Tutorials, IEEE , vol.7, no.2, pp. 72-93, 2005.
112/04/0855
ConclusionConclusion
Future Research Issues for P2P Streaming Location-Aware DHT-Based Searching
Algorithm Wired/Wireless Hybrid P2P Streaming Scalable Video Coding Based P2P Streaming
112/04/08 56
Thank You!
Q & A