Distributed Multimedia Systems THOAI NAM Faculty of Computer Science and Engineering HCMC University of Technology -1.1-
Nov 06, 2015
Distributed Multimedia Systems
THOAI NAM
Faculty of Computer Science and Engineering
HCMC University of Technology
-1.1-
Faculty of Computer Science and Engineering - HCMUT
Multimedia applications
Video conf, digital TV, VoIP
Real-time
Video/audio data as continuous and time-based
Shared resources in Internet
Quality of service (QoS)
Quality of service management
-1.2-
Figure 20.1, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
A distributed multimedia system
Faculty of Computer Science and Engineering - HCMUT -1.3-
Characteristics of typical multimedia streams
Data rate
(approximate)
Sample or frame
size frequency
Telephone speech 64 kbps 8 bits 8000/sec
CD-quality sound 1.4 Mbps 16 bits 44,000/sec
Standard TV video
(uncompressed)
120 Mbps up to 640 x 480
pixels x 16 bits
24/sec
Standard TV video
(MPEG-1 compressed)
1.5 Mbps variable 24/sec
HDTV video
(uncompressed)
10003000 Mbps up to 1920 x 1080 pixels x 24 bits
2460/sec
HDTV video
MPEG-2 compressed)
1030 Mbps variable 2460/sec
Faculty of Computer Science and Engineering - HCMUT -1.4-
Figure 20.2, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
QoS-less applications
Deployed in QoS-less, best-effort computing and network environment
Web-based multimedia Access to streams of audio and video published via the web: best-effort
quality
Not guarantee of performance
Youtube, Hulu and BBC iPlayer
Video-on-demand services Video sent from the sources to the end users
Buffer used
-1.5-
Faculty of Computer Science and Engineering - HCMUT
Highly interactive applications
Internet telephony, video conference, a music rehearsal & performance facility enabling musicians at different locations to perform in an ensemble
Requirements: Low-latency communication
Synchronous distributed state
Media synchronization
External synchronization
-1.6-
Typical infrastructure components for multimedia applications
Faculty of Computer Science and Engineering - HCMUT -1.7-
Figure 20.3, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
QoS specifications for components of applications in Fig 20.3
Component Bandwidth Latency Loss rate Resources required
Camera Out: 10 frames/sec, raw video
640x480x16 bits
Zero
A Codec In:
Out:
10 frames/sec, raw video
MPEG-1 stream
Interactive Low 10 ms CPU each 100 ms;
10 Mbytes RAM
B Mixer In:
Out:
2 x 44 kbps audio
1 x 44 kbps audio
Interactive Very low 1 ms CPU each 100 ms;
1 Mbytes RAM
H Window
system
In:
Out:
various
50 frame/sec framebuffer
Interactive Low 5 ms CPU each 100 ms;
5 Mbytes RAM
K Network
connection
In/Out: MPEG-1 stream, approx.
1.5 Mbps
Interactive Low 1.5 Mbps, low-loss
stream protocol
L Network
connection
In/Out: Audio 44 kbps Interactive Very low 44 kbps, very low-loss
stream protocol
Faculty of Computer Science and Engineering - HCMUT -1.8-
Figure 20.4, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
QoS management
Multimedia applications compete for resources In computers: processor cycles, bus cycles, buffer capacity
In the networks: physical transmission links, switches, gateways
Current solutions: Round-robin or other scheduling scheme that shares the processing
resources on a best-effort basis among all of the tasks currently competing for the central processor
Ethernet: manages a shared transmission medium in a best-effort manner. Collisions are likely to occur when the network is heavily loaded, and this scheme cannot provide any guarantees regarding the bandwidth or latency in such situations
The management and allocation of resources to provide such guarantees is referred to as quality of service management
-1.9-
The QoS managers task
Faculty of Computer Science and Engineering - HCMUT -1.10-
Figure 20.5, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
Quality of service negotiation
Bandwidth
The bandwidth of a multimedia stream or component is the rate at which data flows through it
Latency Latency is the time required for an individual data element to move
through a stream from the source to the destination
Loss rate Some apps accept a certain rate of data loss i.e., dropped video frames or
audio samples
The acceptable ratios are usually kept low seldom more than 1% and much lower for quality-critical applications.
-1.11-
Faculty of Computer Science and Engineering - HCMUT
Burstiness
Consider three streams of 1 Mbps:
One stream transfers a single frame of 1 Mbit every second
The second is an asynchronous stream of computer-generated animation elements with an average bandwidth of 1 Mbps
The third sends a 100-bit sound sample every microsecond.
Whereas all three streams require the same bandwidth, their traffic patterns are very different
The burst parameter specifies the maximum number of media elements that may arrive early That is, before they should arrive according to the regular arrival rate
-1.12-
Faculty of Computer Science and Engineering - HCMUT
Model of linear-bounded arrival processes(LBAP)
The model of linear-bounded arrival processes (LBAP) used in Anderson [1993] defines the maximum number of messages in a stream during any time interval t as Rt+ B, where R is the rate and B is the maximum size of burst
-1.13-
Traffic shaping algorithms
Token generator
(a) Leaky bucket (b) Token bucket
Faculty of Computer Science and Engineering - HCMUT -1.14-
Figure 20.6, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
The leaky bucket algorithm
Any stream can be regulated by inserting a buffer at the source and by defining a method by which data elements leave the buffer
The bucket can be filled arbitrarily with water until it is full; through a leak at the bottom of the bucket water will flow continuously
ensures that a stream will never flow with a rate higher than R. The size of the buffer B defines the maximum burst a stream can incur without losing elements. B also bounds the time for which an element will remain in the bucket
-1.15-
Faculty of Computer Science and Engineering - HCMUT
The token bucket algorithm
The leaky bucket algorithm completely eliminates bursts. Such elimination is not always necessary as long as bandwidth is bounded over any time interval.
The token bucket algorithm achieves this while allowing larger bursts to occur when a stream has been idle for a while
Data are generated at a fixed rate, R. They are collected in a bucket of size B
Data of size S can be sent only if at least S tokens are in the bucket. The send process then removes these S tokens
ensures that over any interval t the amount of data sent is not larger than Rt+ B
-1.16-
The RFC 1363 Flow Spec (1)
Protocol version
Maximum transmission unit
Token bucket rate
Token bucket size
Maximum transmission rate
Minimum delay noticed
Maximum delay variation
Loss sensitivity
Burst loss sensitivity
Loss interval
Quality of guarantee
Bandwidth:
Delay:
Loss:
Faculty of Computer Science and Engineering - HCMUT -1.17-
Figure 20.7, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
The RFC 1363 Flow Spec (2)
The maximum transmission unit and maximum transmission rate determine the maximum bandwidth required by the stream
The token bucket size and rate determine the burstiness of the stream
The delay characteristics are specified by the minimum delay that an application can notice (since we wish to avoid over optimization for short delays) and the maximum jitter it can accept
The loss characteristics are defined by the total number of losses acceptable over a certain interval and the maximum number of consecutive losses acceptable
-1.18-
Faculty of Computer Science and Engineering - HCMUT
Resource management
Fair scheduling Round-robin scheduling to all streams in the same class
Fair queuing: packet-by-packet, bit-per-bit
Weighted fair queuing
Real-time scheduling Traditional real-time scheduling methods suit the model of regular
continuous multimedia streams very well
EDF scheduler uses a deadline that is associated with each of its work items to determine the next item to be processed: the item with the earliest deadline goes first
-1.19-
Faculty of Computer Science and Engineering - HCMUT
Stream adaption (1)
Scaling: adapt a stream to the bandwidth available in the system before it enters a bottleneck resource in order to resolve contention
Temporal scaling: Reduces the resolution of the video stream in the time domain by decreasing the number of video frames transmitted within an interval
Spatial scaling: Reduces the number of pixels of each image in a video stream
Frequency scaling: Modifies the compression algorithm applied to an image
Amplitudinal scaling: Reduces the colour depths for each image pixel
Colour-space scaling: Reduces the number of entries in the colour space. One way to realize colour-space scaling is to switch from colour to greyscale presentation
-1.20-
Faculty of Computer Science and Engineering - HCMUT
Stream adaption (2)
Filtering As scaling modifies a stream at the source, it is not always suitable for
applications that involve several receivers
Filtering is a method that provides the best possible QoS to each target by applying scaling at each relevant node on the path from the source to the target
RSVP [Zhang et al. 1993] is an example of a QoS negotiation protocol that supports filtering
-1.21-
Filtering
Source Targets
High bandwidth
Medium bandwidth
Low bandwidth
Faculty of Computer Science and Engineering - HCMUT -1.22-
Figure 20.8, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
The Tiger video file server
Tiger video file server developed at the Microsoft Research Labs [Bolosky et al.1996]
Video-on-demand for a large number of users
Quality of service Video streams must be supplied at a constant rate with a maximum jitter that is determined by the (assumed small) amount of buffering available at the clients and a very low loss rate
Scalable and distributed: 10.000 clients
Low-cost hardware
Fault tolerance
-1.23-
Tiger video file server hardware configuration
Controller
Cub 0 Cub 1 Cub 2 Cub 3 Cub n
ATM switching network
video distribution to clients
Start/Stop requests from clients
low-bandwidth network
high-bandwidth
0 n+1 1 n+2 2 n+3 n+4 n 2n+1 3
Faculty of Computer Science and Engineering - HCMUT -1.24-
Figure 20.9, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Tiger schedule
0 1 2
slot 0
viewer 4
slot 1
free
slot 2
free
slot 3
viewer 0
slot 4
viewer 3
slot 5
viewer 2
slot 6
free
slot 7
viewer 1
block play time T
block service
time t
state state state state state
Faculty of Computer Science and Engineering - HCMUT -1.25-
Figure 20.10, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
Faculty of Computer Science and Engineering - HCMUT
BitTorrent
BitTorrent [www.bittorrent.com] is a popular peer-to-peer file-sharing application designed particularly for downloading large files (including video files)
Splitting of files into fixed-sized chunks and the subsequent availability of chunks at various sites across the peer-to-peer network
Clients can then download a number of chunks in parallel from different sites
-1.26-
Faculty of Computer Science and Engineering - HCMUT
A .torrent file
The name and length of the file
The location of a tracker(specified as a URL), which is a centralized server that manages downloads of that particular file
A checksum associated with each chunk, generated using the SHA-1 hashing algorithm, that enables content to be verified following download
-1.27-
Faculty of Computer Science and Engineering - HCMUT
The incentive mechanism
The tit-for-tat mechanism [Cohen 2003]
Preference to downloading peers who have previously or who are currently uploading to that site
Peers to behave as good citizens
A given peer supports downloading from n simultaneous peers by unchoking these peers
-1.28-
BitTorrent Terminology
Faculty of Computer Science and Engineering - HCMUT -1.29-
Figure 20.11, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
End System Multicast: an approach to real-time video streaming
Faculty of Computer Science and Engineering - HCMUT -1.30-
Figure 20.12, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012
An example tree in ESM
Faculty of Computer Science and Engineering - HCMUT -1.31-
Figure 20.13, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 Pearson Education 2012