1

A Reliable Chunkless Peer-to-Peer Architecture for Multimedia Streaming R. Bernardini∗ and R. Rinaldo∗ and A. Vitali† ∗

DIEGM – University of Udine, Udine, Italy ST microelectronics, Agate Brianza, Italy {bernardini,rinaldo}@uniud.it, [email protected] †

Abstract In this paper we propose a chunkless structure for multimedia distribution over peer-to-peer networks. With the proposed approach, the original multimedia packets are partitioned into several reduced packets whose transmission requires a fraction 1/R of the bandwidth required by the original data. The generation of the reduced packets depends on a random seed that can be randomly chosen by each node. The reconstruction of the original packet is possible as soon as R reduced packets are received from the other peers. The proposed scheme has a very small computational complexity, it is transparent to cryptography and it is independent on the used multimedia signal coding scheme. Analytical expressions of the start-up time and the probability of information recovery are obtained.

I. I NTRODUCTION Peer-to-peer (P2P) systems have recently attracted the attention of the research community as a possible solution for the problem of video streaming to a large number of users [1], [2], [3]. The reason for this interest is that, since in a peer-to-peer system user nodes also act as servers, a peer-to-peer system is more scalable than a content delivery network. However, in order for P2P networks to gain popularity in multimedia distribution, several important problems are to be solved. Band asymmetry A characteristic of peer-to-peer networks which include home users is that the download bandwidth of a home user (several Mbit/s) is typically much larger than the upload bandwidth (few hundreds of Kbit/s). This means that, even if several users have enough bandwidth to receive video of fairly good quality, they do not have enough bandwidth to transmit it. Node evanescence Home users can turn off their PC at any moment and this can cause an unacceptable loss of quality to those nodes which were receiving data from the turned off PC. Start-up time As explained in the following, the two problems above could be solved by buffering the multimedia material. Unfortunately, buffering requires an initial start-up time which can be very annoying. Digital Right Management (DRM) A main concern with multimedia distribution is the fact that the content should be viewable only to authorized users. Any P2P multimedia distribution system should allow for the application of DRM tools. In several P2P systems for file-sharing, the problem of bandwidth asymmetry is solved by letting each node to download from more than one node. More precisely, in order to

2

download a given file, the user contacts N peer nodes having that file and asks each node a different part (called chunk) of the file. Since the bottleneck in downloading a file from a home user would be the upload bandwidth of the user acting as a server, having N parallel downloads from N different users can, ideally, reduce the download time by a factor 1/N. Although the classical chunk-based approach works well for file-sharing, it is not very useful for live streaming. Indeed, in such a context, the user cannot request “future” chunks since they do not exist yet, and requesting for “past” chunks is useless. A possible way to use the chunk solution even for live streaming would require the use of a buffer where intermediate chunks can be stored, but this would increase the start-up time, a major problem with P2P streaming. Another problem with peer-to-peer networks is the ephemeral nature of participating nodes, which can leave the network at any moment, leaving some nodes disconnected. A very simple solution to this problem would be buffering enough material to be presented to the user while a new peer is searched for. Again, this would require long delay times. An alternative possibility is to use parallel structures together with techniques for robust transmission such as Forward Error Correction (FEC) and Multiple Description Coding (MDC) [3][4]. In this paper we propose an alternative chunkless approach to multimedia distribution over P2P networks. With the proposed approach (inspired by some secret sharing protocols [5]) the original multimedia stream packets are partitioned, by the nodes of the P2P network, into several reduced packets, each corresponding logically to a substream. Each substream requires 1/R of the bandwidth required by the original stream and the way a reduced packet is obtained is uniquely described by a d-bit substream identifier b (usually d = 16 or d = 32), randomly chosen by each node. Thus, each peer node that participates in the transmission can send one substream, generated according to b, to a requesting node, using its reduced upload bandwidth. On the other hand, a node can reconstruct the original data as soon as it receives any combination of R different substreams. A node that wants to access some multimedia content, contacts R peers and asks for the substream they produce. Since each substream requires 1/R of the bandwidth required by the original stream, it is easy to see that there is no bandwidth penalty in this scheme. If some resilience is desired, the node can contact N > R peers, in order to be robust with respect to the sudden departure of at most N − R nodes. Note that, in typical FEC-based approaches [3], a node that receives (a convenient subset of) the code packets, can reconstruct the original information, and forward some appropriate code packets to the another peer. However, this requires to plan which information each node has to forward to another node, because the latter has to receive the appropriate packets that allow for information decoding. In the proposed approach, the FEC framework is reinterpreted so that each node can select randomly and independently from the other peers the seed b used to generate a substream. This is an important advantage for a streaming system involving a large number of decentralized different peers. We also consider and analyze a model of the proposed scheme, in order to obtain analytical expressions of important figures, like the start-up time and the probability of informa-

3

Timestamp

Timestamp

Timestamp

Timestamp

am tre

...

Base Layer

...

Detail Layer

S

e

Packet

Tim

m ea

Ch nk

k un

Packet

Packet

Packet

Timestamp

Timestamp

Timestamp

Stream

(a) 3

tr bs Su

3

Timestamp m ea

2

1

str ub

u Ch

S

k1

un

Packet

Ch

Packet

Packet

Packet

Stream (b)

m

2

(c)

a tre

bs Su

Multimedia content

Fig. 1

Fig. 2

REPRESENTATION OF THE DIFFERENCE BETWEEN THE TRADI TIONAL CHUNK - BASED APPROACH AND THE PROPOSED CHUNKLESS ONE .

D ECOMPOSITION LEVELS OF A MULTI MEDIA CONTENT.

P ICTORIAL

tion recovery, which can be used to set the system parameters. As we show below, the proposed scheme has little computational complexity, it is transparent to cryptography, allowing for the application of DRM techniques, and it is independent on the used multimedia signal coding scheme, allowing for its use also with scalable coding schemes. It is worth to emphasize that in this paper, both for reasons of space and topic suitability, we are concerned only with the multimedia processing part of the distribution scheme (i.e., how to partition/reconstruct the original stream into/from substreams) and not with the protocol aspects of the P2P network (e.g., how to find new peers or how to update the network topology after a node arrival/departure). Such a loss of concern with respect to the P2P protocol details is also due to the fact that the proposed partitioning scheme is independent on the actual P2P protocol employed. II. P RELIMINARY

REMARKS

A. The idea in a nutshell Fig. 1 shows pictorially the difference between the classical chunk-based approach and the proposed chunkless solution. In the chunk-based approach, the multimedia material (pictorially represented in Fig. 1a by an hexagonal prism) is partitioned into chunks relative to different time intervals (Fig. 1b). In the proposed solution, instead, the material is “cut” along the temporal direction into different substreams (Fig. 1c). A new node which wants to receive the live material, contacts N nodes and asks to each node a substream. From the received substreams, the node reconstructs the original material and creates a new substream to be forwarded to the other nodes. The partitioning into substreams will be carried out by decomposing each packet of the original stream into smaller pieces, called reduced packets. The partitioning scheme parametrizes every possible reduced packet by means of a reduced packet identifier (RPID)

4

represented by a d-bit integer number (typically it will be d = 16 or d = 32). The way the packets are partitioned must be such that the original packet can be reconstructed as soon as any combination of R reduced packets with different RPIDs is received. Moreover, the partitioning must be such that each node can decide autonomously (e.g., randomly) how to create its own reduced packet. B. Glossary and notation Since there are several actors in the description of the proposed scheme, it is worth to set some notation with the help of Fig. 2. We will suppose that the multimedia content to be transmitted is composed by one or more streams. For example, in the case of scalable video, one stream could be the base layer, while the other streams could represent the enhancement layers. Another example could be a multiple description video, where each stream is a description. Each stream is described by a sequence of media packets and each media packet has a timestamp (e.g., its playing time). Media packets will typically be obtained by coding the multimedia content. In the considered scenario, there is a provider which wants to broadcast the multimedia content to several users. The provider owns one or more root servers which are the sources of the multimedia content. We will use the term peer or node to denote the single user. Since users act both as servers and as clients, we will talk of server peer (or server node) and client peer (or client node) when we will want to emphasize a specific rˆole. III.

REDUCED PACKET CREATION

According to the overview given above, the key problem is to find a suitable way to create reduced packets. We propose the following algorithm for reduced packet creation. Suppose that a reduction factor R ∈ Z and a finite field F2d (the field with 2d elements, with d = 8k, k ∈ N) are chosen offline. At start-up, each node randomly chooses a non ∆ null element b ∈ F2d and constructs the vector r = 1 b b2 · · · bR−1 , called in the following reduction vector. Successively, when the node needs to create a new reduced packet from a multimedia packet, it uses the following algorithm. • Consider each block of consecutive k = d/8 bytes in the packet as an element of F d . 2 Let pn ∈ F2d , n = 1, 2, . . ., denote the n-th value constructed in this way. Values pn are organized in a matrix p1 pR+1 . . . ∆ p2 pR+2 . . . C= (1) .. ... . pR

•

p2R

...

with R rows and a suitable number of columns (if necessary, the last column is padded with zeros). ∆ Multiply r by C to obtain the reduced vector u = rC. Note that the number of bytes necessary to describe u is R times smaller than the number of bytes contained in the

5

original packet. • L ≥ 1 reduced vectors are collected into a network packet which is forwarded to other nodes. (Collecting more reduced vectors in a single packet allows to reduce the overhead due to the packet header when R gets larger). A client node can recover matrix C (and the packet) from the knowledge of reduced vectors uk = rk C, k = 1, . . . , N ≥ R by solving the linear system 1 b1 b21 · · · bR1 u1 r1 1 b b2 · · · bR u2 r2 2 2 = C = .. ..2 .. (2) .. .. .. C . . . . . . uN rN 1 bN b2N · · · bRN | {z } R

Since matrix R in (2) is a Vandermonde matrix, it is full-rank (and system (2) is solvable) as soon as there are at least R different rows. Note that by choosing N > R, one obtains a scheme that it is robust with respect to packet losses since it suffices to receive R reduced packets out of N to reconstruct the original packet. (See Section IV-D) for a discussion about the computational complexity of solving (2)). It is worth observing that (2) can also be interpreted as the application of a Reed-Solomon (RS) code [6] to matrix C. The main difference with the usual FEC approach is that in this case the code is not imposed by a single entity, but it is determined in a distributed way from the reduction vectors randomly chosen by the nodes. Summarizing the procedure, starting from an original k-byte packet in C, each node can forward k/R bytes in a reduced vector, thus requiring a small upload bandwidth. On the other hand, a node receiving at least R reduced vectors, can reconstruct C and then forward a reduced vector to other nodes. Note that, contrary to what happens with FEC codes, the reduction vector can be chosen randomly by each node. A. Node-dependent reduction factor The reduction factor R must be chosen in order that the bandwidth needed to transmit the reduced data can fit into the smallest upload bandwidth of the clients. Since different clients can have different upload bands, such a conservative approach could give rise to a suboptimal usage of the available resources. In order to overcome such a problem, one can allow nodes with smaller bandwidth to use larger reduction factors, constraining each reduction factor to be a sub-multiple of a suitable Q. If rk and Rk , denote, respectively, the reduction vector and reduction factor of peer k, it is easy to verify that one obtains a linear system similar to (2), but with the Vandermonde matrix R replaced by IQ/R ⊗ r1 1 ∆ .. b= (3) R . IQ/R ⊗ rN N

6

where ⊗ denotes the Kronecker product and IQ/R is the identity matrix with Q/Ri rows. i Observe that, although we are not aware of any simple condition to be imposed on vectors b full-rank, one can ensure that system (2) is solvable by checking during rk to have matrix R b is indeed full-rank. If the reduction vector of the newly found peer makes the start-up that R matrix (3) non full-rank, the peer is discarded and a new one is searched for. IV. A NALYSIS OF THE PROPOSED SCHEME In this section we briefly analyze the characteristics of the proposed scheme in terms of required bandwidth, computational complexity, start-up time, robustness with respect to node departure and transparency to cryptography. A. Required bandwidth We are interested in the bandwidth required by a single node both for upload and for download. Our concern for the upload bandwidth is clear, since it must not be larger than the bandwidth available to a home user (256–512 Kbit/s for a typical ADSL user). The concern for the download bandwidth is due to the fact that, in a P2P network, the overall amount of downloaded data is equal to the overall amount of uploaded data. Since each home user has not enough upload bandwidth to “cover” the amount of downloaded data, the difference must be provided by the root servers. The larger the required download bandwidth, the larger the amount of data that must be produced by the servers. More precisely, if the network has T nodes, each node requires N input streams and each node can produce at most B output streams, it is easy to see that the root server(s) must provide at least T (N − B) streams. Regarding the upload bandwidth, it is clear that it can be made as small as desired by choosing R large enough. Typically, R can be expected to assume values between 10 and 1001 . Regarding the required download band, it is easy to check that it is N/R larger than the band required by the original multimedia material. If no protection is necessary, one can choose N = R. The reasoning above neglects the additional overhead due to the fact that instead of transmitting one single packet, we transmit R smaller packets. When R gets larger, the amount of data required by the headers can become a relevant fraction of the packet size. In this case, one can collect more reduced vectors in a single packet, as outlined above. B. Start-up time and Robustness to Node Departures The details of the statistical characterization of the start-up time clearly depends on the specific P2P protocol employed, but some general results can be obtained anyway. We will suppose that the procedure for joining the P2P network is as follows. When started by the user, the P2P software first opens an UDP port, which will be used to receive the reduced 1 If one wants to transmit video at 4 Mbit/s with a maximum upload bandwidth usage of 128 Kbit/s it must be R ≥ R 0 16. If one wants the user to be able to transmit to other M nodes, it must choose R = MR0 .

=

7 0

10

F28 F216 F232

−2

10

−4

Prob.

10

−6

10

−8

10

−10

10

5

10

15

20

25

30

35

40

45

50

N

Fig. 3 P ROBABILITY OF SELECTING AT LEAST TWO PEERS OUT OF N AS A FUNCTION OF N.

WITH THE SAME REDUCTION VECTOR

packets, and successively contacts a root server, asking for the content and adding to the request the number of the open UDP port. The server starts sending reduced packets to the new user and at the same time searches for nodes which still have some available upload bandwidth. When an available node is found, the server stops one of its streams and it asks the peer to send its reduced data to the UDP port opened by the newly connected user. With this approach, the start-up time is reduced to a minimum. A constraint the selected peer must satisfy is that its reduction vector must be different from the reduction vectors associated with the packets already received by the user. If the selected peer does not satisfy this constraint, it is discarded and a new node is searched for. However, for the sake of simplicity, one could be interested in doing a blind peer search, that is, N peers are randomly selected without checking if the corresponding reduction vectors are different one another. Fig. 3 shows the probability of selecting a wrong set of vectors as a function of N, for different choices of F2d [5]. It can be seen that with F232 one can do the blind search for every reasonable value of N. If the blind search solution is not employed, it has some interest to have an estimate of the number of attempts that are necessary to find a set of N nodes with different reduction vectors. Since each node chooses at random its reduction vector, the problem can be formalized as follows. Let S be the set of the 2d − 1 reduction vectors and let P be the set of the already received reduction vectors. Let H = |P|. The probability PH (n) of finding a good node at the n-th trial is clearly exponential and, more precisely PH (n) = pH (1 − pH )(n−1)

;

pH = 1 −

H . 2d

(4)

The average number of trials is therefore equal to 1/pH = 1/(1−H/2d ) ≈ 1+H/2d , where the latter approximation holds for H 2d . If we neglect the fact that some contacted peers can actually leave the network before the end of the start-up time, we deduce that the start-

8

up will be completed in approximately N

n (N + 1)N 1 + =N+ ∑ d 2 2d+1 n=1

(5)

trials on average. A more detailed analysis of the statistical properties of the proposed scheme can be derived by using the following system model. As said before, by contacting N > R nodes, a node can gain robustness with respect to packet loss and, more importantly, to sudden node departure. Let H(t) ∈ {0, ..., N} denote the number of peers from which a given node is receiving packets at time t. According to the discussion above, when H(t) < N, a new peer is contacted and joins P, the set of the peers which transmit to the current node, after a time interval that can be modeled as an exponential random variable (we are neglecting some minor components of such a time interval, e.g., the amount of time necessary to initially contact the root server(s)). Actually, according to the reasoning outlined above, the time τ necessary to find a new peer depends on the number of peers currently connected (see (4)). In the following, we neglect this dependency, and assume that τ is described by an exponential random variable with appropriate constant parameter λ . Furthermore, as a first order approximation of the departure process, we assume that each peer in P can leave the network, in any small interval of time, with a certain probability and independently from previous time intervals and from the other peers. In such hypothesis, the time a peer remains in P can again be modeled as an exponential random variable with appropriate parameter µ. Within these hypotheses, the process H(t) can be described as a continuous time Markov chain corresponding to an M/M/N/N queue, i.e., with a system with intensity-λ Poisson external arrivals, exponential time of service with parameter µ, N servers and capacity N [7]. Specifically, a new customer “arrives” when a new peer for the current node is found and a customer is “served” as soon as one peer leaves the network. The queue has maximum capacity N because we cannot have more than N available peers. Note that signal reconstruction is possible as soon as at least R peers are available and transmitting to the user. We are interested in computing the failure probability, that is, the probability that at a given time there are less than R available peers. Called ρ = λ /µ, from well-known results of queueing theory, one can deduce that the steady-state probability of having n available peers is [7] N ρn ρk P(ρ, N + 1) −1 ρ PQ (n) = p0 ; p0 = ∑ = e 1− , (6) n! k! N! k=0 where P(ρ, N + 1) is the incomplete-Γ function [8] 1 P(ρ, N + 1) = N!

Z ρ 0

e−t t N dt.

9

The probability of failure is R−1

ρk P(ρ, R) P(ρ, N + 1) PF = P[n < R] = ∑ p0 = 1 − 1− . k! (R − 1)! N! k=0 ∆

(7)

We expect that, as soon as the arrival intensity λ is greater than the maximum departure rate Nµ, the system will be in state N (i.e., there are N available peers) with high probability. The same reasoning allows one to expect that, as soon as one chooses R < ρ, the probability of failure can be made small. Note that in a typical P2P system, the rate for peer discovery can be several order of magnitude greater than the departure rate2 , so that ρ 1 and the constraints on R and N are not critical. Fig. 4 shows the logarithmic plots of PF as a function of ρ, the normalized reduction factor R/ρ and redundancy factor α = N/R. In Fig. 4a and Fig. 4b the curves are plotted for different values of ρ and fixed redundancies α = 1.1 (Fig. 4a) and α = 1.5 (Fig. 4b), while in Fig. 4c and Fig. 4d the curves are plotted for different values of α and fixed ρ = 400 (Fig. 4c) and ρ = 800 (Fig. 4d). It is worth observing that, for typical values of ρ, one can achieve very small failure probability by adding only a little redundancy. The proposed model can also be used to evaluate, for design purposes, other interesting parameters of the system. In particular, the start-up time can be modeled as the first-passage time of H(t) from state 0 to state R [9]. Using known results (e.g., see Eq. (3.16) and Eq. (3.17) of [9]3 ), it is possible to evaluate the statistical moments, in particular the average and standard deviation, of the first-passage time of the system from any state i to state j. C. Transparency to cryptography A main concern with P2P distribution of multimedia material is Digital Right Management (DRM). Since the proposed scheme considers each packet as a “collection of byte,” our scheme can be applied to DRM schemes which employ cryptography. As an example, Fig. 5 shows how to introduce DRM by using asymmetric cryptography with the proposed scheme. The user player, shown in Fig. 5a, is composed of two main blocks: the Recovery/Reduction block, which implements the scheme described so far, and the Player block, which receives encrypted packets. Each player has its own pair of keys. During the start-up phase, the player public key is sent to to the root server (Fig. 5b) which generated, at the beginning of the streaming, a content key used to encrypt the compressed packets. When the server receives the user’s public key, it encrypts the content key with the user’s key and sends the result back to the client. At the client side, the player recovers the content key and uses it to decrypt the multimedia packets. It is worth observing that decrypting the content inside the player (which could also be implemented with proprietary software/hardware) makes it much more difficult to extract the content for saving and/or redistributing. 2 By assuming that the time for finding a new peer is of the order of few seconds, and that each peer remains connected for 10–15 minutes on average, one can deduce that typical values for ρ will be of the order of 500–1000. 3 To take into account the dependency of interarrival times with respect to the number n of customers in the system, as considered in (4), one can use the M[λ (n)]/M/N/N model, for which the results of [9] can also be applied.

10

α=1.10

0

α=1.50

0

10

10

−2

−2

10

10

−4

−4

PF

10

PF

10

−6

−6

10

10

ρ=50 ρ=100 ρ=200 ρ=400 ρ=800

−8

10

−10

10

0

0.2

0.4

0.6

0.8

1

1.2

ρ=50 ρ=100 ρ=200 ρ=400 ρ=800

−8

10

−10

10

1.4

0

0.2

0.4

0.6

R/ρ

(a)

1

1.2

1.4

(b)

ρ=400.0

0

0.8 R/ρ

ρ=800.0

0

10

10

−2

−2

10

10

−4

−4

PF

10

PF

10

−6

−6

10

10

α=1.1 α=1.2 α=1.3 α=1.5 α=2.0

−8

10

−10

10

0.6

0.7

0.8

0.9 R/ρ

1

1.1

α=1.1 α=1.2 α=1.3 α=1.5 α=2.0

−8

10

−10

10

1.2

0.6

0.7

0.8

(c)

0.9 R/ρ

1

1.1

1.2

(d) Fig. 4

L OGARITHMIC PLOTS OF THE PROBABILITY OF FAILURE PF AS FUNCTION OF ρ , THE NORMALIZED R/ρ AND REDUNDANCY FACTOR α = N/R. ( A ) AND ( B ) FAILURE PROBABILITY PF FOR DIFFERENT VALUES OF ρ AND α = 1.1 ( SUB - FIGURE A ) AND α = 1.5 ( SUB - FIGURE B ). ( C ) AND ( D ) FAILURE PROBABILITY PF FOR DIFFERENT VALUES OF α AND ρ = 400 ( SUB - FIGURE C ) AND ρ = 800 ( SUB - FIGURE D )

Player

Encryption

Video archive

Content key

To/from root server

Decryption

Private user key

Decryption

Content Key

Reducer

Encryption

Deparser

Public user key Player

(a) Fig. 5 E XAMPLE OF DRM. I NTERNAL STRUCTURE OF ( A )

Reducer

Public user key

To/from user

Recovery and reduction

To the peers

Reducer

To other peers

From other peers

REDUCTION FACTOR

(b)

THE USER PLAYER ( B ) THE ROOT SERVER

11

D. Computational complexity In order to minimize the delay added by each node, it is important that the computational complexity of the reduction/reconstruction steps be small. We measure the computational complexity in terms of number of F2d operations (sums and products) per sample4 . It is easy to check that the computational cost of the reduction step is equal to approximately 2 operations per sample, while the reconstruction step requires approximately 2R operations per sample. We neglect the cost of inverting matrix C since such inversion is done only once.5 Summarizing, the computational cost added by the reduction/reconstruction procedures can be considered negligible with respect to, e.g., video decoding. V. C ONCLUSIONS We proposed a chunkless approach to multimedia distribution over P2P networks. We believe that the proposed approach is a convenient solution both for the problems of download/upload bandwidth asymmetry and of resilience to node departures or network failures. Compared to other techniques with the same purpose, like FEC, the proposed solution allows each node to act independently from the other nodes, and this is an important advantage in decentralized networks. We have shown, by means of appropriate analysis, that the performance of the system can be adequate under reasonable assumptions. In particular, we obtained analytical expressions of the start-up time and the probability of information recovery. The proposed scheme has very little computational complexity, it is transparent to cryptography and it is independent on the used multimedia signal coding scheme. We are currently implementing and testing the system for actual video transmission in a data network. R EFERENCES [1] F. Kozamernik, “Webcasting – the webcasters’ perspective,” EBU Technical Review, Mar. 2000. [2] S. Alstrup and T. Rauhe, “Introducing Octoshape – a new technology for large-scale streaming over the internet,” EBU Technical Review, July 2005. [3] V. Fodor and G. D´an, “Resilience in live peer-to-peer streaming,” IEEE Communications Magazine, vol. 45, pp. 116– 123, June 2007. [4] V. Padmanabhan, H. Wang, P. Chou, and K. Sripanidkulchai, “Distributing streaming media content using cooperative networking,” in Proc. of NOSSDAV 2002, (Miami, Florida, USA), May 2002. [5] B. Schneier, Applied Cryptography, Protocols, Algorithms, and Source Code in C. New York: John Wiley and Sons, 1996. [6] S. Lin and D. J. Costello,Jr., Error Control Coding: Fundamentals and Applications. Prentice Hall, Englewood Cliffs, NJ., 1983. [7] L. Kleinrock, Theory, Volume 1, Queueing Systems. Wiley-Interscience, 1975. [8] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions. National Bureau of Standards, 1965. [9] D. D. Yao, “First-passage-time moments of markov processes,” Journal of Applied Probability, vol. 22, pp. 939–945, Dec. 1985.

4 The

cost of an operation in F2d is comparable to the cost of the corresponding operation between d-bit integers. one would need to recompute the inverse of C any time the combination of received streams changes. Recomputing the inverse of C can be avoided by using a cache. For typical small values of R and N the memory occupation is limited (e.g., if R = 16 and N = 18 we need to store 18 · 17/2 = 153 matrices). 5 Actually,

A Reliable Chunkless Peer-to-Peer Architecture for Multimedia Streaming R. Bernardini∗ and R. Rinaldo∗ and A. Vitali† ∗

DIEGM – University of Udine, Udine, Italy ST microelectronics, Agate Brianza, Italy {bernardini,rinaldo}@uniud.it, [email protected] †

Abstract In this paper we propose a chunkless structure for multimedia distribution over peer-to-peer networks. With the proposed approach, the original multimedia packets are partitioned into several reduced packets whose transmission requires a fraction 1/R of the bandwidth required by the original data. The generation of the reduced packets depends on a random seed that can be randomly chosen by each node. The reconstruction of the original packet is possible as soon as R reduced packets are received from the other peers. The proposed scheme has a very small computational complexity, it is transparent to cryptography and it is independent on the used multimedia signal coding scheme. Analytical expressions of the start-up time and the probability of information recovery are obtained.

I. I NTRODUCTION Peer-to-peer (P2P) systems have recently attracted the attention of the research community as a possible solution for the problem of video streaming to a large number of users [1], [2], [3]. The reason for this interest is that, since in a peer-to-peer system user nodes also act as servers, a peer-to-peer system is more scalable than a content delivery network. However, in order for P2P networks to gain popularity in multimedia distribution, several important problems are to be solved. Band asymmetry A characteristic of peer-to-peer networks which include home users is that the download bandwidth of a home user (several Mbit/s) is typically much larger than the upload bandwidth (few hundreds of Kbit/s). This means that, even if several users have enough bandwidth to receive video of fairly good quality, they do not have enough bandwidth to transmit it. Node evanescence Home users can turn off their PC at any moment and this can cause an unacceptable loss of quality to those nodes which were receiving data from the turned off PC. Start-up time As explained in the following, the two problems above could be solved by buffering the multimedia material. Unfortunately, buffering requires an initial start-up time which can be very annoying. Digital Right Management (DRM) A main concern with multimedia distribution is the fact that the content should be viewable only to authorized users. Any P2P multimedia distribution system should allow for the application of DRM tools. In several P2P systems for file-sharing, the problem of bandwidth asymmetry is solved by letting each node to download from more than one node. More precisely, in order to

2

download a given file, the user contacts N peer nodes having that file and asks each node a different part (called chunk) of the file. Since the bottleneck in downloading a file from a home user would be the upload bandwidth of the user acting as a server, having N parallel downloads from N different users can, ideally, reduce the download time by a factor 1/N. Although the classical chunk-based approach works well for file-sharing, it is not very useful for live streaming. Indeed, in such a context, the user cannot request “future” chunks since they do not exist yet, and requesting for “past” chunks is useless. A possible way to use the chunk solution even for live streaming would require the use of a buffer where intermediate chunks can be stored, but this would increase the start-up time, a major problem with P2P streaming. Another problem with peer-to-peer networks is the ephemeral nature of participating nodes, which can leave the network at any moment, leaving some nodes disconnected. A very simple solution to this problem would be buffering enough material to be presented to the user while a new peer is searched for. Again, this would require long delay times. An alternative possibility is to use parallel structures together with techniques for robust transmission such as Forward Error Correction (FEC) and Multiple Description Coding (MDC) [3][4]. In this paper we propose an alternative chunkless approach to multimedia distribution over P2P networks. With the proposed approach (inspired by some secret sharing protocols [5]) the original multimedia stream packets are partitioned, by the nodes of the P2P network, into several reduced packets, each corresponding logically to a substream. Each substream requires 1/R of the bandwidth required by the original stream and the way a reduced packet is obtained is uniquely described by a d-bit substream identifier b (usually d = 16 or d = 32), randomly chosen by each node. Thus, each peer node that participates in the transmission can send one substream, generated according to b, to a requesting node, using its reduced upload bandwidth. On the other hand, a node can reconstruct the original data as soon as it receives any combination of R different substreams. A node that wants to access some multimedia content, contacts R peers and asks for the substream they produce. Since each substream requires 1/R of the bandwidth required by the original stream, it is easy to see that there is no bandwidth penalty in this scheme. If some resilience is desired, the node can contact N > R peers, in order to be robust with respect to the sudden departure of at most N − R nodes. Note that, in typical FEC-based approaches [3], a node that receives (a convenient subset of) the code packets, can reconstruct the original information, and forward some appropriate code packets to the another peer. However, this requires to plan which information each node has to forward to another node, because the latter has to receive the appropriate packets that allow for information decoding. In the proposed approach, the FEC framework is reinterpreted so that each node can select randomly and independently from the other peers the seed b used to generate a substream. This is an important advantage for a streaming system involving a large number of decentralized different peers. We also consider and analyze a model of the proposed scheme, in order to obtain analytical expressions of important figures, like the start-up time and the probability of informa-

3

Timestamp

Timestamp

Timestamp

Timestamp

am tre

...

Base Layer

...

Detail Layer

S

e

Packet

Tim

m ea

Ch nk

k un

Packet

Packet

Packet

Timestamp

Timestamp

Timestamp

Stream

(a) 3

tr bs Su

3

Timestamp m ea

2

1

str ub

u Ch

S

k1

un

Packet

Ch

Packet

Packet

Packet

Stream (b)

m

2

(c)

a tre

bs Su

Multimedia content

Fig. 1

Fig. 2

REPRESENTATION OF THE DIFFERENCE BETWEEN THE TRADI TIONAL CHUNK - BASED APPROACH AND THE PROPOSED CHUNKLESS ONE .

D ECOMPOSITION LEVELS OF A MULTI MEDIA CONTENT.

P ICTORIAL

tion recovery, which can be used to set the system parameters. As we show below, the proposed scheme has little computational complexity, it is transparent to cryptography, allowing for the application of DRM techniques, and it is independent on the used multimedia signal coding scheme, allowing for its use also with scalable coding schemes. It is worth to emphasize that in this paper, both for reasons of space and topic suitability, we are concerned only with the multimedia processing part of the distribution scheme (i.e., how to partition/reconstruct the original stream into/from substreams) and not with the protocol aspects of the P2P network (e.g., how to find new peers or how to update the network topology after a node arrival/departure). Such a loss of concern with respect to the P2P protocol details is also due to the fact that the proposed partitioning scheme is independent on the actual P2P protocol employed. II. P RELIMINARY

REMARKS

A. The idea in a nutshell Fig. 1 shows pictorially the difference between the classical chunk-based approach and the proposed chunkless solution. In the chunk-based approach, the multimedia material (pictorially represented in Fig. 1a by an hexagonal prism) is partitioned into chunks relative to different time intervals (Fig. 1b). In the proposed solution, instead, the material is “cut” along the temporal direction into different substreams (Fig. 1c). A new node which wants to receive the live material, contacts N nodes and asks to each node a substream. From the received substreams, the node reconstructs the original material and creates a new substream to be forwarded to the other nodes. The partitioning into substreams will be carried out by decomposing each packet of the original stream into smaller pieces, called reduced packets. The partitioning scheme parametrizes every possible reduced packet by means of a reduced packet identifier (RPID)

4

represented by a d-bit integer number (typically it will be d = 16 or d = 32). The way the packets are partitioned must be such that the original packet can be reconstructed as soon as any combination of R reduced packets with different RPIDs is received. Moreover, the partitioning must be such that each node can decide autonomously (e.g., randomly) how to create its own reduced packet. B. Glossary and notation Since there are several actors in the description of the proposed scheme, it is worth to set some notation with the help of Fig. 2. We will suppose that the multimedia content to be transmitted is composed by one or more streams. For example, in the case of scalable video, one stream could be the base layer, while the other streams could represent the enhancement layers. Another example could be a multiple description video, where each stream is a description. Each stream is described by a sequence of media packets and each media packet has a timestamp (e.g., its playing time). Media packets will typically be obtained by coding the multimedia content. In the considered scenario, there is a provider which wants to broadcast the multimedia content to several users. The provider owns one or more root servers which are the sources of the multimedia content. We will use the term peer or node to denote the single user. Since users act both as servers and as clients, we will talk of server peer (or server node) and client peer (or client node) when we will want to emphasize a specific rˆole. III.

REDUCED PACKET CREATION

According to the overview given above, the key problem is to find a suitable way to create reduced packets. We propose the following algorithm for reduced packet creation. Suppose that a reduction factor R ∈ Z and a finite field F2d (the field with 2d elements, with d = 8k, k ∈ N) are chosen offline. At start-up, each node randomly chooses a non ∆ null element b ∈ F2d and constructs the vector r = 1 b b2 · · · bR−1 , called in the following reduction vector. Successively, when the node needs to create a new reduced packet from a multimedia packet, it uses the following algorithm. • Consider each block of consecutive k = d/8 bytes in the packet as an element of F d . 2 Let pn ∈ F2d , n = 1, 2, . . ., denote the n-th value constructed in this way. Values pn are organized in a matrix p1 pR+1 . . . ∆ p2 pR+2 . . . C= (1) .. ... . pR

•

p2R

...

with R rows and a suitable number of columns (if necessary, the last column is padded with zeros). ∆ Multiply r by C to obtain the reduced vector u = rC. Note that the number of bytes necessary to describe u is R times smaller than the number of bytes contained in the

5

original packet. • L ≥ 1 reduced vectors are collected into a network packet which is forwarded to other nodes. (Collecting more reduced vectors in a single packet allows to reduce the overhead due to the packet header when R gets larger). A client node can recover matrix C (and the packet) from the knowledge of reduced vectors uk = rk C, k = 1, . . . , N ≥ R by solving the linear system 1 b1 b21 · · · bR1 u1 r1 1 b b2 · · · bR u2 r2 2 2 = C = .. ..2 .. (2) .. .. .. C . . . . . . uN rN 1 bN b2N · · · bRN | {z } R

Since matrix R in (2) is a Vandermonde matrix, it is full-rank (and system (2) is solvable) as soon as there are at least R different rows. Note that by choosing N > R, one obtains a scheme that it is robust with respect to packet losses since it suffices to receive R reduced packets out of N to reconstruct the original packet. (See Section IV-D) for a discussion about the computational complexity of solving (2)). It is worth observing that (2) can also be interpreted as the application of a Reed-Solomon (RS) code [6] to matrix C. The main difference with the usual FEC approach is that in this case the code is not imposed by a single entity, but it is determined in a distributed way from the reduction vectors randomly chosen by the nodes. Summarizing the procedure, starting from an original k-byte packet in C, each node can forward k/R bytes in a reduced vector, thus requiring a small upload bandwidth. On the other hand, a node receiving at least R reduced vectors, can reconstruct C and then forward a reduced vector to other nodes. Note that, contrary to what happens with FEC codes, the reduction vector can be chosen randomly by each node. A. Node-dependent reduction factor The reduction factor R must be chosen in order that the bandwidth needed to transmit the reduced data can fit into the smallest upload bandwidth of the clients. Since different clients can have different upload bands, such a conservative approach could give rise to a suboptimal usage of the available resources. In order to overcome such a problem, one can allow nodes with smaller bandwidth to use larger reduction factors, constraining each reduction factor to be a sub-multiple of a suitable Q. If rk and Rk , denote, respectively, the reduction vector and reduction factor of peer k, it is easy to verify that one obtains a linear system similar to (2), but with the Vandermonde matrix R replaced by IQ/R ⊗ r1 1 ∆ .. b= (3) R . IQ/R ⊗ rN N

6

where ⊗ denotes the Kronecker product and IQ/R is the identity matrix with Q/Ri rows. i Observe that, although we are not aware of any simple condition to be imposed on vectors b full-rank, one can ensure that system (2) is solvable by checking during rk to have matrix R b is indeed full-rank. If the reduction vector of the newly found peer makes the start-up that R matrix (3) non full-rank, the peer is discarded and a new one is searched for. IV. A NALYSIS OF THE PROPOSED SCHEME In this section we briefly analyze the characteristics of the proposed scheme in terms of required bandwidth, computational complexity, start-up time, robustness with respect to node departure and transparency to cryptography. A. Required bandwidth We are interested in the bandwidth required by a single node both for upload and for download. Our concern for the upload bandwidth is clear, since it must not be larger than the bandwidth available to a home user (256–512 Kbit/s for a typical ADSL user). The concern for the download bandwidth is due to the fact that, in a P2P network, the overall amount of downloaded data is equal to the overall amount of uploaded data. Since each home user has not enough upload bandwidth to “cover” the amount of downloaded data, the difference must be provided by the root servers. The larger the required download bandwidth, the larger the amount of data that must be produced by the servers. More precisely, if the network has T nodes, each node requires N input streams and each node can produce at most B output streams, it is easy to see that the root server(s) must provide at least T (N − B) streams. Regarding the upload bandwidth, it is clear that it can be made as small as desired by choosing R large enough. Typically, R can be expected to assume values between 10 and 1001 . Regarding the required download band, it is easy to check that it is N/R larger than the band required by the original multimedia material. If no protection is necessary, one can choose N = R. The reasoning above neglects the additional overhead due to the fact that instead of transmitting one single packet, we transmit R smaller packets. When R gets larger, the amount of data required by the headers can become a relevant fraction of the packet size. In this case, one can collect more reduced vectors in a single packet, as outlined above. B. Start-up time and Robustness to Node Departures The details of the statistical characterization of the start-up time clearly depends on the specific P2P protocol employed, but some general results can be obtained anyway. We will suppose that the procedure for joining the P2P network is as follows. When started by the user, the P2P software first opens an UDP port, which will be used to receive the reduced 1 If one wants to transmit video at 4 Mbit/s with a maximum upload bandwidth usage of 128 Kbit/s it must be R ≥ R 0 16. If one wants the user to be able to transmit to other M nodes, it must choose R = MR0 .

=

7 0

10

F28 F216 F232

−2

10

−4

Prob.

10

−6

10

−8

10

−10

10

5

10

15

20

25

30

35

40

45

50

N

Fig. 3 P ROBABILITY OF SELECTING AT LEAST TWO PEERS OUT OF N AS A FUNCTION OF N.

WITH THE SAME REDUCTION VECTOR

packets, and successively contacts a root server, asking for the content and adding to the request the number of the open UDP port. The server starts sending reduced packets to the new user and at the same time searches for nodes which still have some available upload bandwidth. When an available node is found, the server stops one of its streams and it asks the peer to send its reduced data to the UDP port opened by the newly connected user. With this approach, the start-up time is reduced to a minimum. A constraint the selected peer must satisfy is that its reduction vector must be different from the reduction vectors associated with the packets already received by the user. If the selected peer does not satisfy this constraint, it is discarded and a new node is searched for. However, for the sake of simplicity, one could be interested in doing a blind peer search, that is, N peers are randomly selected without checking if the corresponding reduction vectors are different one another. Fig. 3 shows the probability of selecting a wrong set of vectors as a function of N, for different choices of F2d [5]. It can be seen that with F232 one can do the blind search for every reasonable value of N. If the blind search solution is not employed, it has some interest to have an estimate of the number of attempts that are necessary to find a set of N nodes with different reduction vectors. Since each node chooses at random its reduction vector, the problem can be formalized as follows. Let S be the set of the 2d − 1 reduction vectors and let P be the set of the already received reduction vectors. Let H = |P|. The probability PH (n) of finding a good node at the n-th trial is clearly exponential and, more precisely PH (n) = pH (1 − pH )(n−1)

;

pH = 1 −

H . 2d

(4)

The average number of trials is therefore equal to 1/pH = 1/(1−H/2d ) ≈ 1+H/2d , where the latter approximation holds for H 2d . If we neglect the fact that some contacted peers can actually leave the network before the end of the start-up time, we deduce that the start-

8

up will be completed in approximately N

n (N + 1)N 1 + =N+ ∑ d 2 2d+1 n=1

(5)

trials on average. A more detailed analysis of the statistical properties of the proposed scheme can be derived by using the following system model. As said before, by contacting N > R nodes, a node can gain robustness with respect to packet loss and, more importantly, to sudden node departure. Let H(t) ∈ {0, ..., N} denote the number of peers from which a given node is receiving packets at time t. According to the discussion above, when H(t) < N, a new peer is contacted and joins P, the set of the peers which transmit to the current node, after a time interval that can be modeled as an exponential random variable (we are neglecting some minor components of such a time interval, e.g., the amount of time necessary to initially contact the root server(s)). Actually, according to the reasoning outlined above, the time τ necessary to find a new peer depends on the number of peers currently connected (see (4)). In the following, we neglect this dependency, and assume that τ is described by an exponential random variable with appropriate constant parameter λ . Furthermore, as a first order approximation of the departure process, we assume that each peer in P can leave the network, in any small interval of time, with a certain probability and independently from previous time intervals and from the other peers. In such hypothesis, the time a peer remains in P can again be modeled as an exponential random variable with appropriate parameter µ. Within these hypotheses, the process H(t) can be described as a continuous time Markov chain corresponding to an M/M/N/N queue, i.e., with a system with intensity-λ Poisson external arrivals, exponential time of service with parameter µ, N servers and capacity N [7]. Specifically, a new customer “arrives” when a new peer for the current node is found and a customer is “served” as soon as one peer leaves the network. The queue has maximum capacity N because we cannot have more than N available peers. Note that signal reconstruction is possible as soon as at least R peers are available and transmitting to the user. We are interested in computing the failure probability, that is, the probability that at a given time there are less than R available peers. Called ρ = λ /µ, from well-known results of queueing theory, one can deduce that the steady-state probability of having n available peers is [7] N ρn ρk P(ρ, N + 1) −1 ρ PQ (n) = p0 ; p0 = ∑ = e 1− , (6) n! k! N! k=0 where P(ρ, N + 1) is the incomplete-Γ function [8] 1 P(ρ, N + 1) = N!

Z ρ 0

e−t t N dt.

9

The probability of failure is R−1

ρk P(ρ, R) P(ρ, N + 1) PF = P[n < R] = ∑ p0 = 1 − 1− . k! (R − 1)! N! k=0 ∆

(7)

We expect that, as soon as the arrival intensity λ is greater than the maximum departure rate Nµ, the system will be in state N (i.e., there are N available peers) with high probability. The same reasoning allows one to expect that, as soon as one chooses R < ρ, the probability of failure can be made small. Note that in a typical P2P system, the rate for peer discovery can be several order of magnitude greater than the departure rate2 , so that ρ 1 and the constraints on R and N are not critical. Fig. 4 shows the logarithmic plots of PF as a function of ρ, the normalized reduction factor R/ρ and redundancy factor α = N/R. In Fig. 4a and Fig. 4b the curves are plotted for different values of ρ and fixed redundancies α = 1.1 (Fig. 4a) and α = 1.5 (Fig. 4b), while in Fig. 4c and Fig. 4d the curves are plotted for different values of α and fixed ρ = 400 (Fig. 4c) and ρ = 800 (Fig. 4d). It is worth observing that, for typical values of ρ, one can achieve very small failure probability by adding only a little redundancy. The proposed model can also be used to evaluate, for design purposes, other interesting parameters of the system. In particular, the start-up time can be modeled as the first-passage time of H(t) from state 0 to state R [9]. Using known results (e.g., see Eq. (3.16) and Eq. (3.17) of [9]3 ), it is possible to evaluate the statistical moments, in particular the average and standard deviation, of the first-passage time of the system from any state i to state j. C. Transparency to cryptography A main concern with P2P distribution of multimedia material is Digital Right Management (DRM). Since the proposed scheme considers each packet as a “collection of byte,” our scheme can be applied to DRM schemes which employ cryptography. As an example, Fig. 5 shows how to introduce DRM by using asymmetric cryptography with the proposed scheme. The user player, shown in Fig. 5a, is composed of two main blocks: the Recovery/Reduction block, which implements the scheme described so far, and the Player block, which receives encrypted packets. Each player has its own pair of keys. During the start-up phase, the player public key is sent to to the root server (Fig. 5b) which generated, at the beginning of the streaming, a content key used to encrypt the compressed packets. When the server receives the user’s public key, it encrypts the content key with the user’s key and sends the result back to the client. At the client side, the player recovers the content key and uses it to decrypt the multimedia packets. It is worth observing that decrypting the content inside the player (which could also be implemented with proprietary software/hardware) makes it much more difficult to extract the content for saving and/or redistributing. 2 By assuming that the time for finding a new peer is of the order of few seconds, and that each peer remains connected for 10–15 minutes on average, one can deduce that typical values for ρ will be of the order of 500–1000. 3 To take into account the dependency of interarrival times with respect to the number n of customers in the system, as considered in (4), one can use the M[λ (n)]/M/N/N model, for which the results of [9] can also be applied.

10

α=1.10

0

α=1.50

0

10

10

−2

−2

10

10

−4

−4

PF

10

PF

10

−6

−6

10

10

ρ=50 ρ=100 ρ=200 ρ=400 ρ=800

−8

10

−10

10

0

0.2

0.4

0.6

0.8

1

1.2

ρ=50 ρ=100 ρ=200 ρ=400 ρ=800

−8

10

−10

10

1.4

0

0.2

0.4

0.6

R/ρ

(a)

1

1.2

1.4

(b)

ρ=400.0

0

0.8 R/ρ

ρ=800.0

0

10

10

−2

−2

10

10

−4

−4

PF

10

PF

10

−6

−6

10

10

α=1.1 α=1.2 α=1.3 α=1.5 α=2.0

−8

10

−10

10

0.6

0.7

0.8

0.9 R/ρ

1

1.1

α=1.1 α=1.2 α=1.3 α=1.5 α=2.0

−8

10

−10

10

1.2

0.6

0.7

0.8

(c)

0.9 R/ρ

1

1.1

1.2

(d) Fig. 4

L OGARITHMIC PLOTS OF THE PROBABILITY OF FAILURE PF AS FUNCTION OF ρ , THE NORMALIZED R/ρ AND REDUNDANCY FACTOR α = N/R. ( A ) AND ( B ) FAILURE PROBABILITY PF FOR DIFFERENT VALUES OF ρ AND α = 1.1 ( SUB - FIGURE A ) AND α = 1.5 ( SUB - FIGURE B ). ( C ) AND ( D ) FAILURE PROBABILITY PF FOR DIFFERENT VALUES OF α AND ρ = 400 ( SUB - FIGURE C ) AND ρ = 800 ( SUB - FIGURE D )

Player

Encryption

Video archive

Content key

To/from root server

Decryption

Private user key

Decryption

Content Key

Reducer

Encryption

Deparser

Public user key Player

(a) Fig. 5 E XAMPLE OF DRM. I NTERNAL STRUCTURE OF ( A )

Reducer

Public user key

To/from user

Recovery and reduction

To the peers

Reducer

To other peers

From other peers

REDUCTION FACTOR

(b)

THE USER PLAYER ( B ) THE ROOT SERVER

11

D. Computational complexity In order to minimize the delay added by each node, it is important that the computational complexity of the reduction/reconstruction steps be small. We measure the computational complexity in terms of number of F2d operations (sums and products) per sample4 . It is easy to check that the computational cost of the reduction step is equal to approximately 2 operations per sample, while the reconstruction step requires approximately 2R operations per sample. We neglect the cost of inverting matrix C since such inversion is done only once.5 Summarizing, the computational cost added by the reduction/reconstruction procedures can be considered negligible with respect to, e.g., video decoding. V. C ONCLUSIONS We proposed a chunkless approach to multimedia distribution over P2P networks. We believe that the proposed approach is a convenient solution both for the problems of download/upload bandwidth asymmetry and of resilience to node departures or network failures. Compared to other techniques with the same purpose, like FEC, the proposed solution allows each node to act independently from the other nodes, and this is an important advantage in decentralized networks. We have shown, by means of appropriate analysis, that the performance of the system can be adequate under reasonable assumptions. In particular, we obtained analytical expressions of the start-up time and the probability of information recovery. The proposed scheme has very little computational complexity, it is transparent to cryptography and it is independent on the used multimedia signal coding scheme. We are currently implementing and testing the system for actual video transmission in a data network. R EFERENCES [1] F. Kozamernik, “Webcasting – the webcasters’ perspective,” EBU Technical Review, Mar. 2000. [2] S. Alstrup and T. Rauhe, “Introducing Octoshape – a new technology for large-scale streaming over the internet,” EBU Technical Review, July 2005. [3] V. Fodor and G. D´an, “Resilience in live peer-to-peer streaming,” IEEE Communications Magazine, vol. 45, pp. 116– 123, June 2007. [4] V. Padmanabhan, H. Wang, P. Chou, and K. Sripanidkulchai, “Distributing streaming media content using cooperative networking,” in Proc. of NOSSDAV 2002, (Miami, Florida, USA), May 2002. [5] B. Schneier, Applied Cryptography, Protocols, Algorithms, and Source Code in C. New York: John Wiley and Sons, 1996. [6] S. Lin and D. J. Costello,Jr., Error Control Coding: Fundamentals and Applications. Prentice Hall, Englewood Cliffs, NJ., 1983. [7] L. Kleinrock, Theory, Volume 1, Queueing Systems. Wiley-Interscience, 1975. [8] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions. National Bureau of Standards, 1965. [9] D. D. Yao, “First-passage-time moments of markov processes,” Journal of Applied Probability, vol. 22, pp. 939–945, Dec. 1985.

4 The

cost of an operation in F2d is comparable to the cost of the corresponding operation between d-bit integers. one would need to recompute the inverse of C any time the combination of received streams changes. Recomputing the inverse of C can be avoided by using a cache. For typical small values of R and N the memory occupation is limited (e.g., if R = 16 and N = 18 we need to store 18 · 17/2 = 153 matrices). 5 Actually,