On-Demand Media Streaming Over the Internet
Mohamed M. Hefeeda,Bharat K. Bhargava
Presented by Sam
Distributed Computing Systems, 2003. FTDCS 2003. Proceedings. The Ninth IEEE Workshop on Future Trends of , 2003
2
Agenda
Introduction Peer-to-peer model Peer-to-peer streaming protocol Architecture
Index-search algorithm Index-dispersion algorithm
Simulations Evaluation Conclusion
3
Introduction
Overall system capacity is the total number of concurrent clients (peers) the system can support
Mainly Limited by out bound network bandwidth
Others limitationsProcessing power, memory size, I/O speed
4
Peer to Peer (p2p) Model
Peer acts as min-server and client.As a client, it requests media files from the
systemThen the client stores segments of the media
files that it is already consumed for a specific period of time
It can provide these segments to other requesting peers in the system
5
P2p Model
Denote PP = {P1, P2, … PN} the set of all peers in the system
For every Pi , where 1 ≤ I ≤ N, Ri (in Kb/s) : max. rate peer Pi is willing the share with others
Gi (in bytes) : max. storage space the peer is willing to allocate to store segments of one or more media files
Ci : max. number of connections that can be opened to serve requesting peers
6
P2p Model
Media files The set of movies currently available in the system Bit rate = R kb/s Each divided into N segments, a minimum unit which a p
eer can cache. Multiple peers can stream to the requesting peer, sendin
g a rate less than R.
7
P2P Streaming Protocol
The requesting peer checks for the availability of the desired media file in the system
Stream segment by segment
The peer cache the segments
Three Phases
8
Phase IThe requesting peer checks for the availability of
the desired media file in the system
Store other peers information about
• IP address
• Available streaming rate
• Some reliability information from the peer’s history
128.0.20.16 100k b/s Low
9
Phase IThe requesting peer checks for the availability of
the desired media file in the system
Sort based on
• Proximity to client (i.e. hop count)
• Available streaming rate
• Average on-line time
128.0.20.16 100k b/s Low
10
Phase IThe requesting peer checks for the availability of
the desired media file in the system
• End with a verification step to make sure all segments are available.
• Otherwise, backoff and try later
11
Phase IIStream segment by segment
For every segment si, the protocol concurrently connects to all peers that are scheduled to provide pieces of that segment.
Define Pj as the set of peers supplying segment j (sj).
If a peer Px Є Pj has a rate Rx ≤ R,
it provides |sj|(Rx/R) bytes starting at wherever peer Px-1 ends
Since every peer supplies a different piece of the segment
and
All pieces of the segment will be downloaded by the end of time of ς, which is the time to stream the whole segment
jP
x jxj sRRs1
)/(
12
Phase IIIThe peer cache the segments
Runs the dispersion algorithm
Caching the right segments of the media files in right places
Discuss in later section
13
P2P Architecture
Two approaches for the model Index approach : a set of servers maintained
information about the currently participating peers
Overlay approach : does not assign special roles to any peer.
Index approach is presented.
14
Pros and Cons of Index Approach
Pros Easier and faster to deploy The load (eg. CPU, bandwidth, storage) is load More appropriate to commercial media provider,
for accounting and charging customersCons Alleviates the scalability Single point of failure arises
15
Index searching
To make the index server up-to-date If a peer gracefully shuts down
-> a daemon sending notification message to index server Request client checks the list of candidate peers by
pinging them. Client returns to index server the status in one message
16
Index Search Algorithm
a. Get all peers within the same clusterb. Ask those peers to send each segment
d. if those peers still can not provide the shortage, back offc. If peers within the cluster can not provide enough segments, ask the peers outside the cluster
17
Index Dispersion
Objective : Store enough copies of the media files in each cluster to serve all expected client requests from that cluster.
Client Py sends the request and also declare the willingness to cache up to Ny segments serving others with rate Ry in future
The algorithm should make sure that on average, same number of copies of each segment is cached.
18
Index dispersion algorithm
Consider 1 media file with N segments, rate R kb/s, and duration T hours. The index server maintains the followings
For each peer Px
Nx : # of segment cached by Px
Rx : the streaming rate for Nx
Ux : (0≤Ux≤1) fraction of time Px is online
For each cluster c
Lc : next segment to cache
qc : average request rate (per hour) within the cluster.
ac : average # of copies of the movie cached by peers in cluster
xP xxx
c uN
N
R
Ra
19
Index Dispersion Algorithm
Global
A, the average # of copies of the movie cached by all peers in the system
Q, average movie request rate in system
c caA
c cqQ
Q : global required capacity
(1/T)A : global available capacity
20
Index Dispersion Algorithm
a. Identify which cluster the peer residesb. Compute ac, qc, A, Qc. If the demand is larger than available capacity within the cluster
OR
If the global available capacity is too low compared with the global request rate
d. Allow the cache Ny segments in a cluster-wide round-robin fashion.
Py allows to cache Ny segments with rate R
21
Simulation
Parameters 13,000 nodes, hierarchical, Internet-like topology A seeding peer with a limited capacity introduces a
media file into the system. Other peers joins the system and request the file UDP and CBR If the peer does not find all segments with full rate, it
back off again after an exponentially increased waiting time. For a particular threshold, it is rejected.
25
Evaluation
Similar to our project The Index-based search, acting like directory
server, is trivial Not deployed the index-based dispersion
algorithm in simulations Low caching ratio seems useless in their system Multiple video files may need to delete the other
file cache.