Your SlideShare is downloading. ×
0
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
file
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

file

600

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
600
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Others:oStream
  • Transcript

    • 1. P2P On-Demand Video Streaming and Caching 丁建文 高雄應用科大資管系 2010/7/15 1
    • 2. Outline Motivation Introduction On-Demand Streaming and Caching Conclusions 2 2010/7/15
    • 3. 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 3 2010/7/15
    • 4. Client-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 4 2010/7/15
    • 5. CDN-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 5 2010/7/15
    • 6. P2P 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 6 2010/7/15
    • 7. 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 7 2010/7/15
    • 8. Outline Motivation Introduction On-Demand Streaming and Caching Conclusions 8 2010/7/15
    • 9. Introduction P2P streaming is very popular now Famous examples:  PPLive • http://www.pplive.com/  PPStream • http://www.ppstream.com/ 9 2010/7/15
    • 10. Introduction 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 10 2010/7/15
    • 11. 11 2010/7/15
    • 12. 12 2010/7/15
    • 13. Two Main Design Issues How to locate peers? How to deliver data to peers? 13 2010/7/15
    • 14. How to locate peers? Centralized search Hierarchical search Flooding-based search DHT-based search 14 2010/7/15
    • 15. How to locate peers? Centralized Approach Examples: PPStream, PPLive 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 15 2010/7/15
    • 16. 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 16 2010/7/15
    • 17. 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 17 2010/7/15
    • 18. 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 Y d(Y,P): delay between Y and P Tran, D.A.; Hua, K.A.; By doing so, nearby peers are grouped Do, T.T., "A peer- together, making the data transmission based on that to-peer architecture for media structure efficient! streaming," Selected Areas in Communications, IE EE Journal on , vol.22, no.1, pp . 121-133, Jan. 2004 18 2010/7/15
    • 19. How to locate peers? Flooding-Based Approach (1) Example: • GnuStream Gnutella Protocol: 1. Query message sent over existing TCP connections 2. Peers forward query 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. 19 2010/7/15
    • 20. 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. 20 2010/7/15
    • 21. 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) 21 2010/7/15
    • 22. 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. 22 2010/7/15
    • 23. P2P-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. 23 2010/7/15
    • 24. 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 24 2010/7/15
    • 25. 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 25 2010/7/15
    • 26. 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 26 2010/7/15
    • 27. Overlay 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 delay Different P2P schemes have different PLS and RDP 27 2010/7/15
    • 28. 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 28 2010/7/15
    • 29. 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 29 2010/7/15
    • 30. 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 30 2010/7/15
    • 31. 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 31 2010/7/15
    • 32. Topology of Overlay Network Single multicast tree Multiple multicast tree Mesh 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. 32 2010/7/15
    • 33. 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, … 33 2010/7/15
    • 34. 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, … 34 2010/7/15
    • 35. 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, … 35 2010/7/15
    • 36. Outline Motivation Introduction On-Demand Streaming and Caching Conclusions 36 2010/7/15
    • 37. Prominent 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, China VMesh  2007, Hong Kong University of Science and Technology, China 37 2010/7/15
    • 38. P2P VoD: P2Cast  Session Snapshot at time 40  Base tree T=10  Base stream  Patch stream Y. Guo, K. Suh, J. Kurose, D. Towsley, “P2Cast: P2P Patching Scheme for VoD Service,” in WWW 2003. 38 2010/7/15
    • 39. P2Cast - 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 39 2010/7/15
    • 40. 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 40 2010/7/15
    • 41. 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 41 2010/7/15
    • 42. P2Cast - 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 Scheme for VoD Service,” in WWW 2003. 42 2010/7/15
    • 43. 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 43 2010/7/15
    • 44. 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 44 2010/7/15
    • 45. P2P VoD – P2VoD A video session (snapshot at time 36) 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 45 2010/7/15
    • 46. P2VoD 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 46 2010/7/15
    • 47. 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 47 2010/7/15
    • 48. 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 48 2010/7/15
    • 49. 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 49 2010/7/15
    • 50. DCS - 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 50 2010/7/15
    • 51. DHT 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. 51 2010/7/15
    • 52. Pastry 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. 52 2010/7/15
    • 53. Pastry 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. 53 2010/7/15
    • 54. Pastry - 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. 54 2010/7/15
    • 55. Conclusion Future Research Issues for P2P Streaming  Location-Aware DHT-Based Searching Algorithm  Wired/Wireless Hybrid P2P Streaming  Scalable Video Coding Based P2P Streaming 55 2010/7/15
    • 56. Thank You! Q&A 2010/7/15 56

    ×