Your SlideShare is downloading. ×
0
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
Peer-to-Peer Video Services
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

Peer-to-Peer Video Services

189

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
189
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
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

Transcript

  1. Peer-to-Peer Video Services CS587x Lecture Department of Computer Science Iowa State University
  2. Outline <ul><li>Introduction on P2P video systems </li></ul><ul><ul><li>What and why </li></ul></ul><ul><li>Research issues </li></ul><ul><ul><li>Storage management </li></ul></ul><ul><ul><li>Service scheduling </li></ul></ul><ul><ul><li>Video Streaming </li></ul></ul>
  3. P2P Video Systems <ul><li>Definition </li></ul><ul><ul><li>A P2P video system is a logical system consisting a number of hosts collaborating for the purpose of video services </li></ul></ul><ul><li>Features </li></ul><ul><ul><li>Resource sharing </li></ul></ul><ul><ul><ul><li>A host can be both a service requester and a service provider </li></ul></ul></ul><ul><ul><li>There is no central server and no host guarantees the existence of any video </li></ul></ul><ul><ul><ul><li>a host can introduce a video to the system and then delete it quickly </li></ul></ul></ul><ul><ul><li>The participation is fully volunteer </li></ul></ul><ul><ul><ul><li>A seeding host might quit the service at a later time </li></ul></ul></ul>
  4. Why not ALM <ul><li>ALM relies on client forwarding to improve the scalability of the original server </li></ul><ul><ul><li>High demand on client bandwidth </li></ul></ul><ul><ul><ul><li>In ALM, a client needs to have a bandwidth at least 2x of the video playback rate </li></ul></ul></ul><ul><ul><ul><li>In P2P video systems, a client can download a video for its own playback first and then provide it back to serve others </li></ul></ul></ul><ul><ul><li>Limited client participation </li></ul></ul><ul><ul><ul><li>In ALM, a client can contribute its resource only when it is being served </li></ul></ul></ul><ul><ul><ul><li>In P2P video systems, a client </li></ul></ul></ul><ul><ul><ul><ul><li>can become a service provider of a video by keeping a copy of the video </li></ul></ul></ul></ul><ul><ul><ul><ul><li>can participate in video services even if it does not request video itself </li></ul></ul></ul></ul>s c1 c3 c4 c2 c5 c6
  5. Building a P2P Video System <ul><li>A P2P video system can be built on top of a P2P file sharing system </li></ul><ul><ul><li>by extending its functionality to support video services </li></ul></ul><ul><li>Choosing a P2P file sharing system </li></ul><ul><ul><li>Napster-type? </li></ul></ul><ul><ul><ul><li>Single point of failure, scalability issue, etc.. </li></ul></ul></ul><ul><ul><li>Gnutella-like? </li></ul></ul><ul><ul><ul><li>Great for its simplicity, but searching cost could be high </li></ul></ul></ul><ul><ul><li>Freenet-like? </li></ul></ul><ul><ul><ul><li>Great for its search efficiency, but such efficiency is achieved by proactive replication, which may be inappropriate </li></ul></ul></ul><ul><ul><ul><ul><li>Replicating a video over its query path may dramatically increase service latency </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Streaming a video through its query path is untenable </li></ul></ul></ul></ul>
  6. A hybrid of Gnutella and Freenet <ul><li>Adopt Freenet’s routing-table and depth-first search strategy, but replicate only the file pointer </li></ul><ul><ul><li>Why does Freenet replicate a file, not its pointer? </li></ul></ul><ul><ul><li>What are the drawbacks of using routing-table? </li></ul></ul><ul><li>Adopt Gnutella’s download mechanism </li></ul><ul><ul><li>When a client find a video, it downloads the file from the source directly </li></ul></ul>A B C D E (V, E) (V, E)
  7. Video Management <ul><li>Why this becomes a problem </li></ul><ul><ul><li>Videos are large </li></ul></ul><ul><ul><ul><li>Statistics show that a majority of clients contribute less than 1 GB of disk space </li></ul></ul></ul><ul><ul><li>streaming out of a video takes a substantial communication bandwidth </li></ul></ul><ul><ul><ul><li>This seems to be more concerned by users </li></ul></ul></ul><ul><ul><li>If we allow a client to cache a video in its all or not at all, we may end up only a few clients can contribute </li></ul></ul><ul><ul><ul><li>This will again create the problem of server bottleneck </li></ul></ul></ul>
  8. Challenges of Caching Partial Videos <ul><li>Caching collaboration </li></ul><ul><ul><li>Given a fixed amount of disk space, what part of a video should a client cache? </li></ul></ul><ul><ul><li>How can we find a set of video segments that are cached by many different hosts? </li></ul></ul><ul><li>Cache allocation </li></ul><ul><ul><li>Should a client cache a newly download video? </li></ul></ul><ul><ul><li>If yes, how much cache space should be allocated for this video? </li></ul></ul><ul><ul><li>If the cache is full, what existing data should be expunged to make room? </li></ul></ul>
  9. Caching Collaboration: Cell <ul><li>Cell concept </li></ul><ul><ul><li>A cell is a cluster of hosts that together can supply a complete video </li></ul></ul><ul><ul><li>Each host in a cell caches a number of video segments </li></ul></ul><ul><ul><li>A CacheTable is used to track who caches what </li></ul></ul>
  10. Cell Advantages <ul><li>Reducing cache redundancy </li></ul><ul><ul><li>Caching and deletion of file segments can be coordinated at cell level </li></ul></ul><ul><ul><li>The cost of such caching collaboration can be minimal since each cell typically contain only a small number of member </li></ul></ul><ul><ul><ul><li>A cell is split whenever possible </li></ul></ul></ul><ul><li>Reducing search cost </li></ul><ul><ul><li>Looking for a set of video segments now becomes looking for any single segment </li></ul></ul><ul><ul><ul><li>Search scope is dramatically reduced: determined by the distance to the nearest caching host instead of the farthest caching host </li></ul></ul></ul>
  11. Cache Operation <ul><li>Cache procedure </li></ul><ul><ul><li>Retrieve CacheTable from a cell that provides service </li></ul></ul><ul><ul><li>Cache the least redundant segments in CacheTable </li></ul></ul><ul><ul><li>Modify CacheTable and update other cell members </li></ul></ul>
  12. Split Operation <ul><li>Why split </li></ul><ul><ul><li>Keep the cell size small and reduce maintenance overhead </li></ul></ul><ul><li>Exhaustive search is impractical </li></ul><ul><ul><li>To split k hosts into two separate groups, there are O(2 k ) different combinations </li></ul></ul><ul><li>Proposed split algorithm </li></ul><ul><ul><li>Can split a cell whenever possible </li></ul></ul><ul><ul><li>Takes only O(k 2 ) computation </li></ul></ul>
  13. Split Operation <ul><li>Split procedure </li></ul><ul><ul><li>Put all members in OldSet and create an empty NewSet </li></ul></ul><ul><ul><li>Find a host in OldSet and move it to NewSet which satisfies two conditions: </li></ul></ul><ul><ul><ul><li>Without this host OldSet can still supply a complete file </li></ul></ul></ul><ul><ul><ul><li>This host can provide maximum number of segments that are currently not in NewSet </li></ul></ul></ul><ul><ul><li>Repeat this procedure until no such host can be found </li></ul></ul><ul><ul><li>If NewSet can supply a complete file then the original cell can be split into two cells </li></ul></ul>
  14. Split Example
  15. Delete Operation <ul><li>Deletion happens when a host needs to recycle its cache space </li></ul><ul><li>Delete procedure </li></ul><ul><ul><li>Delete most redundant segments in CacheTable </li></ul></ul><ul><ul><li>Modify CacheTable and update other cell members </li></ul></ul>
  16. Merge Operation <ul><li>Merge happens when a cell is broken </li></ul><ul><ul><li>Cell members delete non-redundant segments </li></ul></ul><ul><ul><li>Cell members found off-line </li></ul></ul><ul><li>Merge procedure </li></ul><ul><ul><li>Find a list of cells </li></ul></ul><ul><ul><li>For each member in the broken cell, select a cell from the list and add it into this cell </li></ul></ul><ul><ul><li>Split the resulting cell if possible </li></ul></ul><ul><li>Select procedure </li></ul><ul><ul><li>A host should join a cell whose least redundant segments can be maximally reinforced </li></ul></ul>
  17. Implementation Issues <ul><li>CacheTable consistency </li></ul><ul><ul><li>Using mutual exclusion mechanism such as majority quorum algorithm to avoid concurrent updates on CacheTable </li></ul></ul><ul><ul><li>Using optimistic concurrency control mechanism. When concurrent Delete operations happen and a cell is broken, Merge operation will be invoked to reorganize the cell memebers </li></ul></ul><ul><li>Cell data redundancy control </li></ul><ul><ul><li>Increasing the data redundancy level in a cell to avoid frequent Split and Merge operations </li></ul></ul>
  18. Cache Allocation <ul><li>Given a newly downloaded video, should it be cached? </li></ul><ul><li>If yes, three questions remain: </li></ul><ul><ul><li>How much cache space should be allocated for the new file </li></ul></ul><ul><ul><li>Which part of the file should cached </li></ul></ul><ul><ul><ul><li>This is solved by Cell technique </li></ul></ul></ul><ul><ul><li>If necessary, what data in the cache should be expunged to make space for the new file </li></ul></ul>
  19. Traditional Schemes <ul><li>Least Recently Used (LRU) and Least Frequently Used (LFU) </li></ul><ul><ul><li>Keep popular data items in the cache to reduce the service cost of popular items </li></ul></ul><ul><ul><li>Unpopular files might be quickly deleted </li></ul></ul><ul><ul><li>Suitable for systems with a central server but might cause unpopular files to vanish in a decentralized P2P system </li></ul></ul>
  20. Uniform and Proportional Allocation <ul><li>Uniform allocation </li></ul><ul><ul><li>Maintains equal number of copies in the system for all files </li></ul></ul><ul><ul><li>Protects unpopular files from being extinct but suffers from load balancing problem </li></ul></ul><ul><li>Proportional allocation </li></ul><ul><ul><li>Allocates cache space based on the file popularity </li></ul></ul><ul><ul><li>Achieves optimal load balancing but unpopular files might become extinct quickly </li></ul></ul>
  21. Controlled Inverse Proportional (CIP) Cache Allocation <ul><li>Determine if a newly downloaded file should be cached </li></ul><ul><li>Calculate the amount of cache space to be allocated for the new file </li></ul><ul><ul><li>Try to allocate equal cache space for all videos </li></ul></ul><ul><li>If there is no empty space for a new file, some redundant segments of cached videos are deleted </li></ul><ul><ul><li>Look at the CacheTable of each video </li></ul></ul><ul><li>If there are no redundant segments, a cached video will be deleted to make room for the new video segments </li></ul><ul><ul><li>Which segments should be cached is determined by Cell </li></ul></ul>
  22. CIP-H <ul><li>A heuristic solution </li></ul><ul><ul><li>Compare the popularity of the new video with the popularity of each cached video </li></ul></ul><ul><ul><li>Among all cached videos that have higher popularity than that of the new video, choose the one with the lowest popularity to replace </li></ul></ul><ul><li>Advantages </li></ul><ul><ul><li>Files with lower popularity then the new video will be retained </li></ul></ul><ul><ul><li>Popular videos are replaced dynamically and most popular videos are also retained </li></ul></ul>
  23. CIP- α <ul><li>A solution based on analysis model </li></ul><ul><ul><li>Define Caching Probability of video i as P i =(p min /p i ) a </li></ul></ul><ul><ul><ul><li>p min : the popularity of the least popular video </li></ul></ul></ul><ul><ul><ul><li>p i : the popularity of video i </li></ul></ul></ul><ul><ul><ul><li>α : an adjustable parameter </li></ul></ul></ul><ul><ul><li>By adjusting α , the caching effect of CIP- α can vary between uniform and proportional allocation </li></ul></ul><ul><ul><ul><li>When α = 0, P i =1, CIP- α becomes proportional allocation </li></ul></ul></ul><ul><ul><ul><li>When α = 1, P i =p min /p i, CIP- α becomes uniform allocation </li></ul></ul></ul>
  24. Performance Metrics <ul><li>Accessibility </li></ul><ul><ul><li>Minimum number of hops that a query message needs to be delivered in order to find a complete file </li></ul></ul><ul><ul><li>Measures the cost of searching a large file </li></ul></ul><ul><li>Availability </li></ul><ul><ul><li>Number of distinct copies of the file in the whole system </li></ul></ul><ul><ul><li>Measures the cache space allocated for a file in the system </li></ul></ul>
  25. Schemes for Comparison <ul><li>Caching collaboration </li></ul><ul><ul><li>Cell vs. Random </li></ul></ul><ul><ul><ul><li>Random: a host randomly chooses segments to cache after downloading a video </li></ul></ul></ul><ul><li>Cache allocation </li></ul><ul><ul><li>CIP-h vs. CIP-a vs. Uniform vs. Proportional </li></ul></ul><ul><ul><ul><li>Uniform: all videos are allocated equal cache space in the whole system </li></ul></ul></ul><ul><ul><ul><li>Proportional: the total cache space allocated to a video in the whole system is proportional to its popularity </li></ul></ul></ul>
  26. Simulation Setup <ul><li>Simulated in a Gnutella-like P2P network of 5000 hosts with the average distance between two hosts of 7 hops </li></ul><ul><li>The video popularity follows Zipf-like distribution with skew set to 1 </li></ul><ul><li>The cache space among hosts also follows Zipf-like distribution with skew set to 1 </li></ul><ul><li>100 videos are shared. In the beginning each file has one seeding host. Then hosts begin to download files and cache files. When the network caching capacity has been sufficiently utilized we collect the performance data </li></ul>
  27. Effect of Cell on Video Accessibility <ul><li>Results in Cell and Random show some similarities </li></ul><ul><li>The file accessibility in Cell is much better than that in Random </li></ul>
  28. Effect of CIP on Video Availability <ul><li>CIP provides balance between Uniform and Proportional </li></ul><ul><li>CIP- α provides more fine tuned control over the file availability </li></ul>
  29. Effect of Cell/CIP on Video Accessibility <ul><li>In all cases the accessibility in Cell/CIP is better than that in Random/Uniform and Random/Proportional </li></ul>
  30. Effect of Cell/CIP on Video Availability <ul><li>The curves of Cell/CIP fall between Random/Uniform and Random/Proportional </li></ul><ul><li>Adjusting α can change CIP- α between Uniform and Proportional </li></ul>
  31. Conclusions <ul><li>Caching collaboration </li></ul><ul><ul><li>Cell caching can effectively balance the data redundancy and reduce the search cost for large files </li></ul></ul><ul><li>Cache allocation </li></ul><ul><ul><li>CIP cache allocation can achieve loading balancing and maintaining unpopular files in the system </li></ul></ul>

×