2.5 Streaming continuity Probabilities and Average Number of Downloaded Stream-
2.5.4 Probabilities of Requesting and Downloading Chunks for a Cooperat-
Cooperating Peer
We recall that, any random cooperating peer in this network hasHv fixed number of viewing neighbors and a buffer Lc of fixed length. It is also assumed that at any time slot if any randomly picked viewing peer (e.g. peer A) receives more than one request, u of them (including the one from D) will be fulfilled randomly by peer A.
We define sc2vmax, the maximum number of requests that an arbitrary cooperating peer (e.g., D) having i chunks in the current time slot can send to its neighbors as:
sc2vmax = min{Hv, (Lc/m − i)}
specific time slot.
Next, we define Fc2v(Hv, i, k), as the probability that a randomly selected cooperating peer which hasi useful chunks in its buffer, in a specific time slot, looking for i = (Lc/m−i), chunks in that time slot, sendsk requests to its neighbors. Fc2v(Hv, i, k) can be recursively calculated as follows:
Fc2v(hv, i, k) = Uic2vFc2v(hv − 1, i − 1, k − 1) + (1 − Uic2v)Fc2v(hv − 1, i, k). (22) where, i = (Lc/m − i), 0 ≤ hv ≤ Hv, 0≤ k ≤ min {i, hv} and 0 ≤ i ≤ Lc,
The first component of the right hand side in (22) assumes the peer sends one of the requests to one of the Hv viewing neighbors. Hence, it is looking for one less chunk (i.e., i− 1) from the remaining neighbors (i.e., hv − 1) and sends one less request (i.e., k − 1).
The recurrence relation (22) has the following initial conditions:
Fc2v(hv, i, k) = ⎧ ⎨ ⎩ 0 if (hv = 0 or i = 0) and k > 0 1 if (hv = 0 or i = 0) and k = 0.
Next, we calculate the expected-value of the number of requests sent by a cooperating peer having i useful chunks as Lc2vi and define kc2v as the average number of requests that any arbitrary cooperating peer sends to its viewing neighbors at any given time slot.
Lc2vi = min{i,Hv} k=0 kFc2v(Hv, i, k). (23) kc2v = Lc/m i=0 (PicLc2vi ). (24)
where,i =Ls−i We define Xc2v as the average number of requests that a randomly selected viewing peer (e.g., peer A) receives from its neighbors in addition to the request received from cooperating peer D:
Xc2v = (Hc − 1)k
c2v
Hv +k
v2v
. (25)
The first term in (25) is related to the cooperating peers and it shows that Hc cooperating peers send (Hc− 1)kc2v requests to their viewing neighbors and on an average each of the
Hv viewing neighbors receive (Hc− 1)kc2v/Hv requests from them.
peers send Hvkv2v requests to their viewing neighbors and on an average each of the Hv viewing neighbors receive kc2v requests from them.
We define Qc2v as the probability that a randomly selected peer (e.g., peer A) arbitrarily fulfills uv requests (i.e., including the one from peer D) among all the requests it received
Qc2v = uv 1 +Xc2v.
(26)
Upload capacity, uv, is assumed to be 1. Hence, in the absence of requests from other neighbors, the only request from peer D is guaranteed to be fulfilled. Now, we compute the probability of forward transition in the discrete-time stochastic model shown in Figure 7 as follows:
We define rc2vi,n, as the probability that a cooperating peer, which has i useful chunks at a given time slot, downloadsn chunks in the same time slot. Hence:
ri,nc2v = min{Lcm−i,Hv} k=n Fc2v(Hv,Lc m − i, k) k n (Qc2v)n(1− Qc2v)k−n . (27)
Next, we define,Mic2v, probability that a randomly picked cooperating peer in the network having i useful chunks uniformly distributed in its cooperating buffer Lc at a specific time slot, can play a chunk in the same time slot. Since a cooperating peer does not playback a chunk, it simply advances its play (track) pointer at the rate of one chunk/time slot. This is how the cooperating buffer of a cooperating peer is updated the same way the viewing buffer of a viewing peer is updated with respect to time. In fact this is associated with the probability of transition from state i to state i − 1 as shown in Figure 7.
Since we do not set priority to any of the chunks, the probability that we have the first chunk (for continuous playing or tracking) is:
Mic2v = i
Lc/m i = 0, 1, ..., Lc/m. (28)
If the system is in state i, the probability the system jumps to state i + k in the next time slot is given by:
Bi,i+kc2v = (1− Mic2v)ri,kc2v+Mic2vrc2vi,k+1. (29) If the system is in state i, the probability the system jumps to state i − 1 in the next time slot is given by:
Bi,i−1c2v =Mic2vrc2vi,0. (30)
corresponds to the situation where the first chunk is missing (i.e., peer cannot playback in that time slot) and k chunks are downloaded. However, the second term represents a situation where the peer can play back in the current time slot and downloads (k + 1) chunks. In equation 30, the peer plays back in the current time slot but downloads no useful chunk. When the system is in steady state, the probability distribution of any state in the model (shown in Figure 7) does not change with time and we can write the global balance equation: (Bi+1,ic2v Pi+1c ) + ⎛ ⎝min{Hv,i} k=1 (Bi−k,ic2v Pi−kc ) ⎞ ⎠ − L s−i k=1 (Bi,i+kPic) − (Bc2v i,i−1Pic) = 0. (31)
It is difficult to find a closed form of solution for the relation in (31) in order to get the peer distribution {Pic}. This is because, in the stochastic model, we have Ls+ 1 unknown states andLs+1 equations for the solution. Implementing such an analytical solution scheme for so many unknowns would cause memory leak in the system. However, it is possible to solve (31) numerically and results very close to the close form of solution. We compared our numerical solution with the simulation result from our own simulator.
Next, we define Pcontc , as the probability that a randomly picked cooperating peer in the network that is keeping track of a certain live streaming content in a specific time slot, would be able to track the desired chunk at the same time slot. It can be expressed as follows:
Pcontc =
Lc/m
i=0
PicMic2v. (32)
Let dc2vi be the average download rate of a cooperating peer having i useful chunks in its buffer Lc/m in a specific time slot:
dc2vi =
min{Hv,Lc/m−i}
k=0
kri,kc2v i = 0, 1, ..., Lc/m. (33)
The average download rate of a cooperating peer can be expressed as follows:
dc2v =
Lc/m
i=0
dc2vi Pic. (34)
Figure 7 shows different states of A discrete-time Stochastic model for an arbitrarily selected cooperating peer in the HnH scheme based multi-channel live streaming system.
Figure 7: A discrete-time stochastic model for cooperating peers in the HnH scheme having effective buffer size Lc/m, where m is the number of sub-streams.