Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presenter: Kuei-Yu Hsu Advisor: Dr. Kai-Wei Ke 2014/6/9 Implementation of a Peer-to-Peer Real-time streaming media system.

Similar presentations


Presentation on theme: "Presenter: Kuei-Yu Hsu Advisor: Dr. Kai-Wei Ke 2014/6/9 Implementation of a Peer-to-Peer Real-time streaming media system."— Presentation transcript:

1 Presenter: Kuei-Yu Hsu Advisor: Dr. Kai-Wei Ke 2014/6/9 Implementation of a Peer-to-Peer Real-time streaming media system

2 Outline Introduction Background System Architecture Packet-Delivery Algorithm Push-based System (DMFT and CDMFT) Pull-based System (Revised BitTorrent) Test and Implementation Conclusion 2

3 Introduction Client-Server Network Content Delivery Network Peer-to-Peer Network Hybrid CDN & P2P Network 3

4 Client-Server Network 4 With increasing network bandwidth, Network transport are not only text or static image, but also audio and video. The traditional Client-Server architecture can't afford the number of growing users. Client Server

5 Content Delivery Network 5 1. Server Side: Content Delivery Network (CDN) Replicate the content from the original content server at its local cache. Distribute the content to clients. There are 2 ways to enhance the multimedia access. CDN Servers

6 Peer-to-Peer Network 6 2. Client Side: Peer-to-Peer (P2P) Network Clients become active associates by transmitting received content to other clients. Peer-to-Peer

7 Hybrid CDN & P2P Network 7 Hybrid CDN and P2P Network CDN Servers Peer-to-Peer

8 Background P2P Streaming System ALM Technique IPM versus ALM 8

9 P2P Streaming System 9 A system without a central server, where each participating node, act both as a server and a client. Content to be shared is sourced in parts by each node – peers. Famous Application of P2P Streaming: PPStream CoolStreaming

10 ALM Technique 10 Multiple Connections: Multiple Unicast Unicast is the most common way to make connection in the network. Multiple unicast always produce duplicate paths. IP Multicast (IPM) Failed due to concerns regarding scalability, deployment, and support for higher level functionality. Application Layer Multicast (ALM) Dispatcher algorithm potentially avoids redundant communication in the network.

11 Overlay Network 11 Conceptual Routing Network Physical Routing Network

12 IPM versus ALM 12 IP Multicast Application Layer Multicast

13 System Architecture System Concept Diagram Three Subsystems System Block Diagram 13

14 System Concept Diagram 14 VLC Source Camera Source VLC Client Camera Client

15 System Architecture (cont.) 15 Three Subsystems: 1. Streaming Transfer subsystem Data Buffering Ordering 2. Algorithm subsystem Set routing information (i.e. Build tree structure) Determine where the streaming packets transport to 3. Network Management subsystem Manage socket connection status Process multiple asynchronous I/O requests

16 System Architecture 16 System Block Diagram

17 Packet-Delivery Algorithm Push-based System DMFT CDMFT Pull-based System Revised BitTorrent 17

18 Push-based System 18 Nodes are arranged in a tree structure. Selected frame is pushed from a parent node to its child node. Delay in the push system occurs when a node leaves – subsequently leading to rediscovery of the parent -child relation - Tree is regenerated. Moreover there can be redundancy when two nodes are pushing the same frame to a node.

19 DMFT 19 DMFT: Distributed Multisource Forwarding Tree A multi-source multicast algorithm in application layer for routing. Every member can not only provide source contents but also can forward data to others. Need to maintain some neighbor information. NIT (Neighbor Information Table) DFT (Data Forwarding Table)

20 DMFT Tables 20 NIT: Neighbor Information Table Record the distance of each member which is in the group DFT: Data Forwarding Table Maintain the routing information NIT Field nameMember IPHop Count DFT Field nameSource IPNext Peers IPParent IP

21 DMFT Flow Chart 21 (1) Member Join (2) Construct Routing Tree (3) Prune Duplicate Path (4) Recover Tree Structure (5) Inquire at regular time

22 CDMFT 22 CDMFT: Cluster Distributed Multisource Forwarding Tree An enhanced DMFT algorithm for reducing control messages. With cluster-based group management, all multicast group members are grouped into different clusters. Each cluster has a cluster head which is responsible for managing cluster members and forwarding multicast data.

23 CDMFT Hierarchical 23 Cluster Headers Cluster Members

24 Pull-based System 24 Peers request neighboring peers for the next frame needed by them. Each peer has a buffer-map of the frames currently held by it and its neighbors. A Peer refers each of its neighbors buffer-map to decide from whom to pull data. Disadvantage: Making requests of pull again and again and exchanging buffer maps can result in congestion.

25 BitTorrent Network (cont.) 25 Common BitTorrent terms: Tracker: A server that keeps track of which seeds and peers are in the swarm. Seeder: Refers to a machine possessing some part of the data. Swarm: Together, all peers (including seeds) sharing a torrent are called a swarm. Leech: A peer or any client that does not have 100% of the data. Also, refers to a peer (or peers) that has a negative effect on the swarm by having a very poor share ratio.

26 BitTorrent Network 26 BitTorrent download Strategies: 1. Rarest First The rarest pieces are transmitted with high priority. The strategy can use in the two cases. 2. Tit for tat The strategy is used to optimize the download speed Choking Policy: Peers are uploaded to more cooperating peer. Optimistic Unchoking: A peer will upload to other peers randomly in a period.

27 Test and Implementation Code Organization System Test Cases Test Tools 27

28 VLC media player 28 A free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols. Plays most codecs with no codec packs needed: MPEG-2, DivX, H.264, MKV, WebM, WMV, MP3...

29 Implementation 29 Organize Codes: Test Respectively: IOCP asynchronous transport: Sender, Receiver Buffering and Ordering Thread Manager, Memory Manager Routing Algorithm Original UsedCurrent Used IDEEclipse C++ Qt C++ UI wxWidget wxFormBuilder Qt UI http://projects.tano.si/vlc-qt

30 Code Organization (cont.) 30 Original Used IDE: Eclipse

31 Code Organization 31 Current Used IDE: Qt

32 System Test (cont.) 32 Test Case: Unicast versus Multicast system Different bitrate video sources Test Range: 1 peer localhost (127.0.0.1) loopback 2 peers connect directly 2 peers connect through network 3 peers, 4 peers……

33 System Test 33 Test Environment: Localhost Self-Contained Network Realistic Network Test Packets loss tool: Wireshark (Telephony) Test Transport Stream packets tool: TSReader MPEG-2 Transport Stream packet analyser

34 Wireshark 34

35 TSReader 35

36 MPEG-2 Transport Stream packet analyser 36

37 Conclusions Future works 37

38 Conclusions 38  For enhancing system performance, need to trace the whole project codes to find where the bug is.  Will update the prototype to an integrated system.  Integrate VLC media player into our system.  Compatible with other kind of media players.  Find more analysis tools to validate the system results.  Hope to use real Live sources (i.e.Camera) when system is stable.

39 References (cont.) 39 J. Liu, S. Rao, B. Li, and H. Zhang,“Opportunities and challenges of peer-to-peer internet video broadcast,” Proc. of the IEEE, vol. 96, no.1, pp. 11-24, Jan. 2008. W. Zhanga, Q. Zhenga, H. Lib and F. Tian,“An overlay multicast protocol for live streaming and delay-guaranteed interactive media,” Journal of Network and Computer Applications, vol. 35, Issue 1, pp. 20-28, Jan. 2012.

40 References 40 Chia-Hui Huang, “Design and Analysis of Application Layer Multicast Routing Protocols,” Unpublished doctoral dissertation, National Taipei University of Technology, April 2013. Wen-Neng Tsai,“Design of a live multimedia streaming system with pull-based P2P transport technology”, Unpublished master dissertation, National Taipei University of Technology, July 2013. Tzu-Tung Liao,“Design of a multisource multimedia streaming system with fast recoverable application layer multicast algorithm”, Unpublished master dissertation, National Taipei University of Technology, July 2013.

41 Thanks for listening 41


Download ppt "Presenter: Kuei-Yu Hsu Advisor: Dr. Kai-Wei Ke 2014/6/9 Implementation of a Peer-to-Peer Real-time streaming media system."

Similar presentations


Ads by Google