Your SlideShare is downloading. ×
Real - Time Mobile P2P Video Streaming Overlay
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

Real - Time Mobile P2P Video Streaming Overlay

636

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
636
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
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. Real-time Mobile Peer – to – Peer Video Streaming Overlay W.V. Wathsala, Ramith Jayasinghe, Nuwan R. Gunarathna Lanka Software Foundation, UCSC Building Complex, 35, Reid Avenue, Colombo7, Sri Lanka {wathsala, ramithj, nuwanr}@opensource.lk Abstract— The Real Time P2P Video Streaming Overlay is a – to – peer system every participant can be viewed as a real time video streaming application that uses a peer – to – peer potential consumer and a producer. overlay for streaming and discovery of content. Streams can be However it should be mentioned that this is not the first created, discovered and viewed from plethora of heterogeneous attempt on peer – to – peer media streaming [12], [13], [14]. devices such as desktops, smart phones and internet tablets etc. It Most of the previous works including both none – real-time comes with capabilities to perform real time video stream search streaming and real-time streaming does not have an integrated queries and aggregating those into user defined channels (filters). distributed stream search service. In those systems peers The real time search allows users to search for live video streams become aware of streams through a web site [12]. Secondly available on the network coming from various devices connected to the network ranging from mobile phones to HD cameras none real-time peer – to – peer media streaming environments attached to PCs. Channels can be considered as standing queries hold redundantly stored media which can be searched and plus a collection of known and permanent set of video streaming accessed by peers, in such systems it is also possible for a peer resources which are at the disposal of the users allowing them to to relay a stream receiving at the moment to another peer. access their favourite content easily. Relaying of streams is not a quite scalable method when it comes to mobile devices that have less CPU power and Keywords— streaming, P2P, overlay, mobile bandwidth. Existing real-time peer – to – peer streaming environments also use the above mentioned stream relaying method which is not scalable where mobile devices are used. I. INTRODUCTION System proposed here eliminates these two issues of real-time streaming platforms. To overcome the two issues we are Today the Internet has passed the point where it could proposing two overlay networks organized appropriately to become usable as a means of sharing digital information serve the requirements of being able to scale and being able to without existence of search engines. With power of search search in real-time. The purpose of the system is searching a engine technologies such as Google real - time search and web stream and building a map of the stream delivery network and – 2.0 paradigms have changed the life style of people by extending it. Actual streaming takes place with existing making the World Wide Web a platform for entertainment and streaming protocols such as RTP and appropriate CODECs news with a personal touch. For example, online diaries such once the nearest location of the stream has been identified by as Blogspot[6], Wordpress[7] allow people around the world the recipient. Therefore QoS is not a concern in this paper. to share their ideas, experiences and knowledge while places From here onwards the paper is organized as follows, in like Flickr[9] let users to publish their photos in a searchable section II the design of the overlays and algorithms are format. Taking the content sharing and publishing to a new discussed, in section III future works and implementation is era of social networking, web sites like Facebook[8] has allow discussed and in the section IV the conclusion is presented. its users not only to share but also to make virtual communities and networks that expand over geographical II. DESIGN boundaries. On the other hand file sharing software such as The system is built to share and search video content on Napster[10], Kazaa[11] brought paradigm of P2P to real time fashion. At this point we should make two mainstream, creating another opportunity for Internet users to assumptions and their basis clear. share content without central governance. It’s obvious that, underlying concepts of these softwares and services are to let users to share something with others, instantly and  A stream made available by a participating node is boundlessly. Extreme popularity of these softwares and available for the rest of the nodes in time services allow us to believe that Internet users and humans in after streaming has been started. general are fond of sharing and expressing themselves and are  Before streaming starts a set of tags describing the always looking for newer means of doing so. stream is distributed in time by the Because of these reasons, we believe that there should be publisher which in turn can be searched by the more opportunities to content publishers (especially other nodes in time individuals and small and medium scale publishers) while When an overlay satisfies the above assumptions it is safe improving individual choice by introducing heterogonous to assume the system will act in a real-time fashion as software and hardware infrastructure which enables live/real – expected even with large values of n (number of peer). time video streaming over a peer –to – peer network. The However with modern Distributed Hash Tables (DHTs) such environment we propose (over the time) will consist of time complexities are practical and also hop – to – hop time thousands of content publishers who are streaming various counts are in milliseconds in the Internet. Therefore the entire media types such are localized news, sports, musical shows system is built by integrating several Distributed Hash Tables etc., while consumers search and filter the media creating their (DHTs) as shown in Fig. 1 and two of them are core overlays own channels as their per se. Since proposed system is a peer or mandatory overlays corresponding to two assumptions stated above. Namely they are the content overlay and the tag
  • 2. overlay. The tag overlay is built on top of a DHT which This structure guarantees that no traffic other than the functions as a distributed tag cloud providing the basis for node’s own will pass through a regular node which are content discovery and search. The content overlay is typically less resourceful and typically behind NATed and responsible for distributing content over the network and firewalled networks like desktops and mobile devices. functions on top of a DHT. Beyond these two services any overlay based on DHTs can be added to the system depending on the application requirements such as overlays for authentication, advertising, etc., which we will not be covering here. A. Hierarchical Structured Overlay Methods described [1],[2],[3] assumes multiple senders and discusses algorithms for selecting the best sender. In those approaches parts of the stream can be downloaded from different senders making it impossible to stream in real-time. Such systems may not be scalable for mobile devices as they are not resourceful with respect to CPU power, RAM and bandwidth. Fig. 1 Overlays In real-time streaming environment the video is uploaded to the network on the fly from a single device while all other devices are reading it as it becomes available. However it is impossible to connect all interested stream recipients to the streaming device or use peer – to – peer relaying techniques used by [12], [13], [14] due to resource constraints such as CPU power, RAM and available bandwidth on the mobile device streaming the content. To overcome this problem we propose a hierarchical structured overlay for distribution of real-time video streams where devices lacking resources will become Regular Nodes while resourceful devices become Super Node. Super nodes form the peer – to – peer real-time streaming network and should have adequate bandwidth to perform this task. The sub overlay formed by the Super Nodes will handle routing of media streams while Regular Nodes are only involved in publishing and receiving media streams. In this environment nodes join the DHT as regular nodes and may get upgraded to super node status based on their resource availability such as available bandwidth, CPU power and RAM. To evaluate the suitability to become a super node an approach similar to sender selection method discussed in [1] can be used. The hierarchical overlay is shown in Fig. 2, regular nodes are depicted as small circles and super nodes as large circles. The only difference between super nodes and regular nodes are that. Fig. 2 Hierarchical overlay B. The Tag Overlay  Only super nodes can function as bootstrap nodes. Tag overlay enables the user to search for live streams in  A node which has been elected as a super node real-time fashion. The search mechanism described here is should at least have one super node as its immediate implanted on clients and is not a distributed process. Each tag neighbour. on a super node in the tag overlay contains keywords and associated meta-data objects. A keyword is simply a string Fig. 2 shows a graph satisfying above conditions. The key which describes a particular stream. A meta-data object characteristics of such formation are that contains a set of parameters such as stream key (which identifies the DHT key of the streaming device) and a  Regular nodes always cluster around super nodes. timestamp (if the holding node’s time is greater than the value  All the super nodes excluding all the regular nodes of this timestamp the metadata object will be deleted). The tag should form a sub graph. overlay or the distributed tag cloud must be populated accordingly by each user before using the content overlay as
  • 3. shown in the Fig. 3. Regular nodes only submit tags to the involving a reliability matrix, popularity matrix and overlay and search for tags, super nodes are the node where authentication protocols. those submitted tags are stored and searched for those (note: super nodes are also regular nodes therefore in addition to special tasks they too can perform whatever performed by regular nodes). When a regular node submits a tag and if the same tag has been already stored in the overlay by a different device the super node holding the tag will not create a new tag; instead it will associate incoming meta-data with the existing tag, otherwise a new tag will be created by the destination super node with associated metadata. In other words there is a one – to – many relationship between keywords and tags. Similarly if a tag has no more metadata objects associated to it the super node will delete the tag itself from the system thus freeing the system resources. This mechanism does not allow for stale tags to last in the system for long periods of time pointing to dead streams. To avoid premature deletion of a metadata object the streaming node has to update the timestamp in the metadata object stored in a super node in a timely fashion by sending messages. Fig 4 shows how metadata {S0, S1, S6 and S9} has been associated with the tag Cricket. Fig. 4 Bob’s device starting a stream after setting tags in the overlay Fig. 3 Accessing tag overlay and content overlay separately In the tag overlay shown in Fig. 4, Bob’s device start a stream by first publishing tags {Cricket, Sri Lanka, Dambulla, ODI, England}. As depicted in the graph (content overlay) a tag can have metadata objects that intern has pointers (stream keys) to multiple streams if multiple devices have streams tagged with same key word. Bob’s stream is identified by the stream key S6. The tags he submitted to the overlay are now stored with metadata (S6 in this case1) in super nodes SN1, SN3, SN4, and SN5. Once the stream has been made available to the public over the content overlay it can be contacted by clients through the stream key after searching for the appropriate key words on the tag overlay. As shown in Fig. 5, Ted may search for keywords set {England, ODI, Cricket} and find a set of results, S6 video stream being the closest match to his query. The simplest form of this search is given below; however in reality search may become a more complex process than given below 1 Metadata data object is identified by the stream key ignoring the timestamp Fig. 5 Streams in action for convenience.
  • 4. TABLE 1 LookupStream( )i: RESULTS TABLE Signature: Key Word Results As for , and actions where is England S5, S6, S16 a message and j is a UID of a process. ODI S6, S9 Cricket S0, S1, S6, S9 States: As for , plus: TABLE 2 Initially WEIGHTS TABLE Unique Streams Found Weight Intially S6 1 S9 0.66 S0 0.33 S1 0.33 Transitions: S5 0.33 As for : S9 0.33 Precondition: The above query produces a set of results consisting of As for , plus: streams S6, S9, S0, S1, S5 and they are ordered in ascending If then order according to a weight function. Weight W Sj of the stream Sj is simply the number of keywords which are positive for Sj out of n number of key words (each denoted by ki) that made up the user’s query. The formula to this End if calculation is given below. If a stream Sj is associated with a Effect: key word ki it is denoted by ki,Sj, which can take a value either As for : 0 or 1. If an association is found ki,Sj = 1 else ki,Sj = 0. If then Else (2) End if As an example S9 appeared for two keywords in the query consisting keywords England, ODI, Cricket as shown in Table 1. Since there are three keywords involved here Effect: . In the above query As for in : S9 is positive for both ODI and Cricket but negative for England. Therefore , hence Fig. 6 I/O automaton for stream lookup according to Eq. 2 Ws9 = (1 + 1 + 0)/3 = 0.66 as shown in Table 2. In Fig 5, the path between streaming node and the rendezvous point of the stream identified by the key S6 is C. Peer – to – Peer Streaming Overlay given by the edge (SN1, SN4) and path between the end According to the architecture of the system, regular nodes recipient and the rendezvous point is given by the edge (SN0, only stream content to the network (in this case video streams SN1, SN3). In the example Ted searched for key words from devices) while super nodes are responsible of both Cricket, ODI and England and ended up with the stream key delivering streams and streaming to consumers. S6 corresponding to a video streamed by Bob. Since Ted The video stream submitted to the content overlay by the knows the stream key S6 he is now capable of requesting the streaming node will be routed to a super node closest to the overlay to connect his node with the rendezvous point of the stream key of the video stream through the DHT. The super video identified by the stream key S6, thus creating the edge node which receives this stream from the streaming node (SN0, SN1, SN3). After the path SN0 - SN1 - SN3 has been becomes a rendezvous point on the DHT. The stream key of created on the DHT an RTP connection can be established on the metadata object found as a result of the previously the same path relaying the stream from SN1 to SN3 via SN0. mentioned search process points to this rendezvous point. As depicted in Fig. 5, after Ted starts receiving the stream Since all communications happen over the DHT any Alice who connects to the overlay through SN0 too wants the intermediate super node in the overlay that falls in the path same video stream identified by the key S6, but in this case no between rendezvous point and intended recipient will also new stream paths will be created between super nodes SN0 have to read the stream as they are responsible of routing the (Alice’s super node) and SN1 (the rendezvous point for S6) as stream between two endpoints in the overlay. the stream requested by Alice is already passing through SN0. Therefore SN0 will directly start streaming the video to Alice’s node which is connected to SN0 in Fig 5 using RTP. As a result of this approach only one connection will be
  • 5. maintained per video stream between super nodes no matter next immediate none saturated super node on the how many end users requested to watch the video stream overlay. This process too can be presented using an identified by the same key. This approach for streaming is I/O automaton similar to the one given in Fig. 6. very economical due to effective bandwidth utilization and it resembles the qualities of IP multicasting. In this case it is possible to visualize the group of nodes which falls on the III. FUTURE WORK AND IMPLEMENTATION same stream path as a multicast group. Future work will be done separately on peer – to – peer The advantage of this architecture is that it ensures at most real-time streaming and real-time searching. The stream one connection per stream is maintained in the sub graph lookup algorithm can be simulated before a real formed by the super nodes. Therefore this model splits the implementation and sender selection and bandwidth system bandwidth in to two partitions. management approaches mentioned in [1], [2], [3] also can be considered when improving system performance. 1) Super Node to Super Node Outbound Bandwidth: Implementation will be done on Linux a platform using The network presented by this sub - graph is the most Chimera DHT. The system will be developed in C++ language resourceful network. The bandwidth is used for and should be ported to mobile platforms such as MeaGo, streaming between two or more super nodes on Android and iPhone with appropriate language wrappers if demand. Each super node in between the sender and necessary. the recipient nodes contribute their bandwidth to the stream established between them. IV. CONCLUSION The model can be used to specify the maximum Apart from entertainment, news and revenue models the number of streams that can be streamed system will have an impact on the society as well. The social simultaneously in the peer – to – peer overlay. Let aspect of this utility will ensure the free flow of information denote the playback rate of the ith stream on the which is quite essential in a free society. Since we are network, Let be the super node to proposing a free peer – to – peer platform for heterogeneous super node outbound bandwidth of super node . devices such as mobile phones and PCs, reporting of social Node is said to be saturated with streams if events will be drastically changed. The society will be aware following condition is satisfied. and experience events in real-time due to real-time peer – to – peer streams which are searchable and capable of being aggregated in to channels created by users themselves. (2) ACKNOWLEDGMENT Once a super node becomes saturated no more We thank our peers at Lanka Software Foundation and its streams can be transferred over it. If it is the only way administration for the constructive role they have played while between a potential sender and a recipient of a stream continuously supporting to refine the concept and by proof then that stream cannot be realized until comes out reading this article. of the saturated state. If a super node in the way is found to be saturated REFERENCES then the saturated super node can forward the stream [1] Dongyan Xu , Mohamed Hefeeda , Susanne Hambrusch , Bharat establishment request to its super node neighbours Bhargava, On Peer – to – Peer Media Streaming. In Proc. Of IEEE until a super node that streams the intended stream is ICDCS’02, 2002, pp 363 – 371 [2] Mohamed Hefeeda, Ahsan Habib, Boyan Botev, Dongyan Xu, Bharat found. The I/O automaton is specified in Fig. 6. Bhargava, PROMISE: Peer – to – Peer Media Streaming Using CollectCast. In Proc. of eleventh ACM international conference on 2) Super Node to Regular Nodes Outbound Bandwidth: Multimedia, 2003, pp 45 – 54 This is the simplest bandwidth management problem [3] Duc A. Tran, Kien Hua, Tai Do, A Peer – to – Peer Architecture for Media Streaming, 2003. in the system. If a super node has enough bandwidth [4] Chimera (n.d.) [Online]. Available: more regular nodes can connect to it. Let http://current.cs.ucsb.edu/projects/chimera be outbound bandwidth of super [5] A. Rowstron and P. Druschel, Pastry: Scalable, decentralized object location and routing for large-scale peer-to-peer systems, node to the direction of regular nodes and be the Middleware'2001, Germany, November 2001. ith stream transmitted to any of the regular nodes [6] Blogspot (n.d.) [Online]. Available: http://www.blogspot.com connected to it. A super node can get saturated by [7] Wordpress (n.d.) [Online]. Available: http://www.wordpress.org streaming videos to its regular peers if following [8] Facebook (n.d.) [Online]. Available: http://www.facebook.com [9] Flickr (n.d.) [Online]. Available: http://www.flickr.com condition is satisfied. [10] Kazza (n.d.) [Online]. Available: http://www.kazza.com [11] Napster (n.d) [Online]. Available: http://en.wikipedia.org/wiki/Napster (3) [12] TVU (n.d) [Online]. Available: http://en.wikipedia.org/wiki/TVUnetworks [13] PPLive (n.d.) [Online]. Available: http://en.wikipedia.org/wiki/PPLive If a regular node connects to a saturated super node PPStream (n.d.) [Online]. Availabe: the super node should transfer the regular node to its http://en.wikipedia.org/wiki/PPStream

×