This application is related to patent application Ser. No. 11/933,730, filed Nov. 1, 2007.
The invention, in its several embodiments, is related in general to multi-computer data transferring and is particularly related to computer-to-computer data streaming by providing distributed search methods for live and time-shifted streaming via distributed caching in peer-to-peer systems.
Video on demand (VoD) streaming systems allow users to receive and watch video content over a network. The state of the art presently includes the peer-to-peer media streaming systems that support only live-streaming. In P2Cast, the system requires a server that can keep track of the overlay structure consisting of peers. The P2Cast server handles every new peer that joins and rejoins after peer disconnection. Requiring a central server to support peer joining and rejoining can restrict the system scalability and as the critical node the central server becomes the single point of failure. In oStream, an overlay construction algorithm requires each peer to have full knowledge of all participating peers regarding system join time, video positions, buffer sizes, and the like. This requirement for contemporaneous common complete nodal knowledge drives a geometrically growing need for throughput in communications. That is, the contemporaneous common complete nodal knowledge requirement may impose high communication overhead among peers to achieve sufficient and timely information exchange especially in scenarios where peers frequently join and leave the system.
An exemplary method embodiment of the present invention for registering cached media includes the step of hashing a media index of cached media to yield a key and then, for less than a defined number of attempts, the step of attempting and insertion of registration information associated with the key into a hash table overlay based on the key. The method may further include testing as to whether the adjusted key is above a maximum media block index, and if so, then inserting the registration information into the hash table overlay based on the maximum block index. The method may further include testing as to whether the adjusted key is less than zero, and if so, then inserting the registration information into the hash table overlay based on a zero index.
Another exemplary method embodiment of the present invention for requesting cached media includes a repeatable step, albeit for a defined number of times, where the step is one of requesting the registration information of a peer associated with the key in a distributed hash table overlay and testing as to whether the requested registration information was received, and if not, adjusting the key by an offset. There may also be testing as to whether the adjusted key is less than zero, and if so, then a step of requesting cached media from a server, e.g., a video server, based on the media index may be executed. If the penultimate try at requesting the registration information is unsuccessful, then a step of requesting cached media is made of a from a server, e.g., a video server, based on the key.
An additional exemplary method embodiment, include the step of requesting cached media from a peer associated with received registration information and, testing whether the requested cached media is not received prior to a time threshold, and if not, then prompting a node to ping the peer associated with received registration information. The exemplary method may further include testing whether a response to the ping is received prior to a second time threshold, and if not, then deleting registration information associated with the peer from the distributed hash table overlay. The exemplary method may be applied separately or in conjunction with other method embodiments.
An exemplary apparatus embodiment of the present invention includes addressable memory, e.g., a playback buffer and a distributed stream cache and a processing subsystem in communication with the addressable memory where the processing subsystem, whether through circuitry, the execution of machine-readable code, or combinations of both, is configured to: (a) hash a media index of the cached media to yield a key; and while an attempt count is less than a threshold: and (b) transmit, e.g., via a port and a packet transmission network, the key for insertion into the hash table overlay registration information associated with the key. The processing subsystem may also be further configured to: (a) increment the attempt count and adjust the key by an offset if the transmission is not inserted; (b) transmit for insertion into the hash table overlay the registration information based on the maximum block index if the adjusted key is above a maximum media block index; and (c) transmit for insertion into the hash table overlay the registration information if the adjusted key is less than zero. In addition, the processing subsystem may be further configured to: (a) request the registration information of a peer associated with a second key in a hash table overlay. The processing subsystem may also be further configured to: (a) increment the request count and adjust the second key by an offset, if no registration information received; (b) request, e.g., via a port and a packet transmission network, cached media from a server based on a media index, if the adjusted second key is less than zero; and (c) request cached media from a server based on the key if an attempt count is equal to the threshold.
An exemplary system embodiment of the present invention may include: (a) a first processing node that has: (i) addressable memory comprising a playback buffer and a distributed stream cache; and (ii) a processing subsystem in communication with the addressable memory and configured to: (A) hash a media index of the cached media to yield a key; and while an attempt count is less than a threshold: (B) transmit, for insertion into a hash table overlay, registration information associated with the key; and (b) a second processing node, in communication with the first processing node via a packet transmission network, the second processing node having: (i) addressable memory; and (ii) a processing subsystem in communication with the addressable memory and configured to manage the hash table overlay. The processing subsystem of the first node may be further configured to: (A) increment the attempt count and adjust the key by an offset if the transmission is not inserted; (B) transmit for insertion into the hash table overlay the registration information based on the maximum block index if the adjusted key is above a maximum media block index; and (C) transmit for insertion into the hash table overlay the registration information if the adjusted key is less than zero. The processing subsystem of the first node may be further configured to request the registration information of a peer identified as associated with a second key in a hash table overly. The processing subsystem of the first node may further configured to: (A) increment the request count and adjust the second key by an offset, if no registration information was received; (B) request cached media from a server based on a media index, if the adjusted second key is less than zero; and (C) request cached media from a server based on the key if an attempt count is equal to the threshold. In addition, the processing subsystem of the first node may be further configured to: prompt at least one of the second processing node and a third processing node to ping the identified peer, if the requested cached media is not received prior to a time threshold; and the second processing node and/or a third processing node may have a processing subsystem this is configured to delete registration information associated with the identified peer from the distributed hash table overlay.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings, and in which:
Distributed Search Algorithm
The invention, in its several embodiments, may be described as methods of distributed search based on a Distributed Hash Table (DHT) and devices that effect such searches. Distributed lookup protocols may be applied to provide a robust distributed service to locate a node in the network. For instance, given a key, an exemplary lookup protocol may provide a node mapped onto the key. For example, peers may form a lookup overlay. The overlay may be a virtual ring structure that comprises the nodes. When a peer arrives, i.e., initiates joining the peer-to-peer network, it may select a random number between 0 and 2m−1 as a node identifier or ID. Collisions may occur where two processing nodes, seeking to become peers simultaneously seek to join the overlay using the same node identifier. Although m can be any positive integer, a value such as 160 may be chosen in order to keep the collision of node IDs very low. Identifiers of a number of processing nodes in the network may be stored locally by a peer in what may be termed a finger table. As part of interfacing with the overlay, the new peer follows the necessary steps to build its finger table and successor list (e.g., a list of successor pointer). A key also ranges from 0 to 2m−1. When a lookup of the key is requested, the lookup overlay that runs the exemplary lookup protocol returns a node that is closest to the key.
A DHT provides services such as key/data pair insertion, lookup and deletion in a distributed fashion which includes services that a conventional hash table provides for storing and retrieving data. Since peers join and leave anytime, the underlying lookup overlay may not be robust or provide wrong replies to queries. In order to enhance DHT service robustness, key/data pair replication may be applied. For example, by the replication of the key/data pair among k adjacent peers, no key/data pair is lost unless all k peers leave the system concurrently. Accordingly, the lookup overlay may be applied to implement a DHT. That is, the DHT service may be provided by the distributed lookup overlay, which lies on top of peers and may be termed a DHT overlay.
Application of DHT
In a P2TSS, a DHT overlay may be applied to find a peer in a distributed fashion. For example, peers may register their Distributed Stream Cache information to the DHT overlay and the information may be retrieved later by other peers looking for a particular video segment. As a key, the ID of the first video block in DSC of a peer may be used. Data, or a value, may be associated with the key and such data may include the network address of the peer corresponding to the key. A key/data pair then may be an input for DHT insertion and a key may be an input for DHT lookup. Since the data in the key/data pair in this example acts as a pointer to the peer that actually holds video segments, the DHT overlay may be independent of the data distribution overlay that is used for video data delivery. In addition, not all peers need to participate to form the lookup overlay. For example a super-peer structure for a peer-to-peer protocol may be used where peers with higher-speed network access form, as super-peers, the lookup overlay and where the remainder of the peers may consult the super-peers as to data insertion and lookup. Accordingly, while not all peers need participate in building the lookup overlay. For purposes of simplified exposition, one may presume that all peers participate in building the lookup overlay.
DSC Registration
Referring to
One of the reasons to choose the block ID as an input to a hash function is because it is difficult to spread out keys over the virtual ring space without knowing the length of the media stream. So that, if the source of the media is a live program, the length of the program may not be known before the program starts. Another reason for choosing the block ID as an input to the hash function is that because the contiguous keys can be spread out over the ring space by the hash function, the probability that a node holds contiguous keys is very low. This unlikelihood of contiguous keys improves the performance of DHT operations against a node failure or departure.
When multiple peers attempt to put the same key to the DHT overlay, a collision occurs. This collision may be resolved by attempting the DHT insertion successively until a key is available. This process may be termed a “Successive DHT insertion” method when the algorithm is embodied as machine-readable code and executed via one or more computing nodes.
Successive DHT Insertion Method Pseudo-Code may be expressed as follows:
The pseudo-code for the successive DHT insertion method 240 (
the peer may call for DHT.ForcedInsert(·) to insert the key forcefully, i.e., with direct effect and without regard for current occupancy of the nodal position, into the respective nodal position 322, 332 in the DHT overlay. In addition, when the number of attempts reaches a threshold value 340. Thres, the peer calls the DHT.ForcedInsert(key) 342 to insert the key forcefully into the respective nodal position in the DHT overlay corresponding to the adjusted key at that iteration.
DSC Retrieval
Successive DHT Lookup Method Pseudo-Code may be expressed as follows:
Peer Dynamics and DSC Deletion
Peers may join and leave the system at anytime. Because the joining time and exiting time may vary from peer to peer, the information returned by the DHT overlay may not correctly reflect the system status at a particular time. The DHT overlay may employ its own recovery mechanism 550 under such peer dynamics. For example, referring back to
Distributed Search Methods and Models
Performance models of the distributed search algorithm for peers in a network where the peers practice in this exemplary model a live stream caching policy where a peer, P joining the system caches the most recent portion of the stream regardless of its choice of the starting position of the video. Also for this exemplary model, the backward back-off method is applied for both the DSC registration and video retrieval from a DSC.
DSC Registration
As part of the DSC registration, the DHT insertion may be attempted until an empty spot is found and the insertion takes place. The time elapsed in the repeated unsuccessful attempts at registration preceding a successful registration may directly affect the delay of the DSC registration and add to the overhead processing time allocated to the DHT overhead. Accordingly, an indicator of the delay and effect on the imposed overhead may be referenced to assess and optionally aid in the control of both possible symptoms of the DHT overlay. Where prospective viewers of a video stream, having a total length L, may join a network to access the media stream as a peer, one may presume peers arrive at the system according to a Poisson process having an arrival rate λ. Let i=
Where there are, for example, Np Peers, they may all arrive at the system before time L. Peers that arrive at the interval [iQ, (i+1)Q) perform a DSC registration where the DSC caches the media stream for both the playback of the peer and the filling of its DSC with Bi. Let Ii represent the media interval [iQ, (i+1)Q). Similarly let Ai represent the number of peer arrivals in the media interval Ii. The first peer that arrives in Ii sees no collision. If the second peer arrives in Ii, it collides with the first peer. By the backward back-off, it attempts the key of Bi-1 (where the offset in this example is presume presumed to be one). The attempt is successful only when Ai-1=0. If Ai-1 is not zero, then the second attempt in this example also fails. In this example, successive attempts are repeated until an empty slot is found or any condition is met according to Successive DHT Insertion Method.
To assess this symptom, one may apply an independence model or a simplified dependence model. In the application of an independence model, one may presume the location of keys is independent of each other. This may neglect the effect of successive DHT insertion attempts due to collisions, but it captures the system performance with reasonable accuracy when the key space is sparse, i.e., when the load factor α of the system is relatively low. The load factor α of the system may be derived from the ratio of the number of peers and the number of possible slots on the key space. For example, α may equal
where the number of possible slots on the key space is given as
and the numerator (Np) is the number of DSC registration operations performed by peers, which is identical to the number of peers.
In this example, one may represent the number of collisions experienced in the course of DSC registration by C. For the independent model, the average number of collisions may be expressed via an expectation operator as E(C) where
E(C of ith arrival) is the average number of collisions that the ith key insertion takes. On ith insertion, i−1 keys are observed on the overlay. When a collision occurs, successive attempts are assumed in this model to be independent of previous attempts. A random variable I, the number of total DHT insertion attempts, follows a geometric distribution of parameter
where p is the probability of collision when there are i−1 keys on the overlay. The predictive model presumes the hash value of a key to be uniformly distributed over the key space.
In the second approach, we consider successive insertion attempts with some simplification. Suppose each interval is of length L/Q. Since the peer arrival is modeled as a Poisson process, Ai of each non-overlapping interval Ij, j=1, . . . , L/Q, follows Poisson distribution with parameter of λL/Q, where the peer arrival rate λ is Np/L. For purposes of the present model, Ai=k, Ai-1=a, Aj=0, 0≦j≦i−2. The first peer of interval i sees no collision. On the other hand, the ith peer (1<1≦k) sees a+l−1 collision because “a” previous slots are occupied and additionally it has to collide with l−1 peers belonging to Ii. Table 1 shows the number of collisions depending on the value of Ai.
Based on this observation, E(C) may be expressed as follows:
where U is an event in which Ai-2=0, . . . ,A0=0. This may be termed a first order solution. The solution to E(C\Ai=k) is an approximation since we do not take into account the cases other than Ai-1=a, Aj=0; 0≦j<i−1. However, when the load factor α is small, Pr (Ai>1) is also small and the approximation matches the simulation results reasonably. One may increase the accuracy of the solution by considering more cases. The second order solution to the problem considers non-zero values of Ai-2.
DSC Retrieval
In this section, we develop a probability model for the delay pertaining to DSC retrieval, i.e., the latency of DSC retrieval. While a principal contributor to the delay in communication, or latency of the DSC retrieval may depend on the physical distance between peers and their local communication processing delays, the latency focus of the present performance pertains to the number of attempts of successive DHT lookups. Suppose Np keys are placed on the overlay and no peers join or leave during a DSC retrieval process. Then, the number of keys can be assumed to remain as Np. When the offset is small, the successive DHT lookup is affected by successive DHT insertion. On the other hand, as the offset increases, the impact of successive DHT insertion decreases and eventually the correlation between two successive DHT lookups becomes weak. Let N denote the number of DHT lookups for a DSC retrieval. Assuming the offset is big enough to assume successive DHT lookups are independent, the probability that N=k is:
Pr(N=k)=(1−α)k-1α,
where α is the load factor defined in the previous section.
PMF of the Number of Keys
When Np>>1, the equation approximates a Poisson distribution with parameter
The PMF of N is:
So far, the presumed number of available key locations,
has been sufficiently large to not appreciably affect the model thus far. If L/Q is less than or comparable to Np, the assumption of the uniformity of key distribution on the space is affected. When the system operates where
to reduce collisions, the uniformity assumption generally holds.
Experimental Results
To verify the performance of the proposed distributed search algorithm, extensible simulator for DHT algorithms was used (PlanetSim).
Overall Performance
Performance of DSC Retrieval
Computer-based simulations were conducted in order to predict the performance of the exemplary DHT overlay for the DSC Retrieval. In the simulations, Np is set to 500. L, an exemplary run time in seconds, remains 7200 and Q, a quantized block of time, is set to the value of five. In
From these figures, one may observe the probability increases as the offset increases. In fact, the probability converges to the load factor α, in this case it is
Depicted in
One of ordinary skill in the art will also appreciate that the modules and functions described herein may be further subdivided, combined, and/or varied and yet still be in the spirit of the embodiments of the invention. In addition, while a number of variations of the invention have been shown and described in detail, other modifications, which are within the scope of this invention, will be readily apparent to those of ordinary skill in the art based upon this disclosure, e.g., the exemplary flowcharts or processes described herein may be modified and varied and yet still be in the spirit of the invention. It is also contemplated that various combinations or subcombinations of the specific features and aspects of the embodiments may be made and still fall within the scope of the invention. Accordingly, it should be understood that various features and aspects of the disclosed embodiments can be combined with or substituted for one another in order to form varying modes of the disclosed invention. Thus, it is intended that the scope of the present invention herein disclosed should not be limited by the particular disclosed embodiments described above.
Number | Name | Date | Kind |
---|---|---|---|
5995623 | Kawano et al. | Nov 1999 | A |
6363149 | Candelore | Mar 2002 | B1 |
7174385 | Li | Feb 2007 | B2 |
20020162109 | Shteyn | Oct 2002 | A1 |
20020194601 | Perkes et al. | Dec 2002 | A1 |
20030126277 | Son et al. | Jul 2003 | A1 |
20030219235 | Nakatani et al. | Nov 2003 | A1 |
20040034550 | Menschik et al. | Feb 2004 | A1 |
20050108203 | Tang et al. | May 2005 | A1 |
20060050697 | Li et al. | Mar 2006 | A1 |
20060053209 | Li | Mar 2006 | A1 |
20060069798 | Li et al. | Mar 2006 | A1 |
20060069800 | Li | Mar 2006 | A1 |
20060080454 | Li | Apr 2006 | A1 |
20060095401 | Krikorian et al. | May 2006 | A1 |
20060107286 | Connor et al. | May 2006 | A1 |
20060190615 | Panwar et al. | Aug 2006 | A1 |
20060195914 | Schwartz et al. | Aug 2006 | A1 |
20070033167 | Basu et al. | Feb 2007 | A1 |
20070113096 | Zhu et al. | May 2007 | A1 |
20070130360 | Li | Jun 2007 | A1 |
20070130361 | Li | Jun 2007 | A1 |
20070150601 | Angelica | Jun 2007 | A1 |
20070192321 | Farr et al. | Aug 2007 | A1 |
20070192349 | Farr et al. | Aug 2007 | A1 |
20070195796 | Ushiyama et al. | Aug 2007 | A1 |
20070250582 | Sidhu et al. | Oct 2007 | A1 |
20070299820 | Bushmitch et al. | Dec 2007 | A1 |
20080037527 | Chan et al. | Feb 2008 | A1 |
20080205291 | Li et al. | Aug 2008 | A1 |
20080235746 | Peters et al. | Sep 2008 | A1 |
20090327505 | Rao et al. | Dec 2009 | A1 |
20100218260 | Schwartz et al. | Aug 2010 | A1 |
Number | Date | Country |
---|---|---|
1 643 716 | Apr 2006 | EP |
2004-260532 | Sep 2004 | JP |
2006-079606 | Mar 2006 | JP |
2006-221457 | Aug 2006 | JP |
WO 0207388 | Jan 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20090116640 A1 | May 2009 | US |