Streaming and Content Delivery
Download
Report
Transcript Streaming and Content Delivery
Streaming and
Content Delivery
SECTIONS 7.4 AND 7.5
Digital Audio
Audio waves are converted to a digital format by an ADC (Analog-to-Digital
Converter) by taking electrical voltage as input and generates a binary number
as output.
Reserve is to convert digital formats with DAC, so that sound can be projected
by an audio device.
Problem with this is that doing so creates high transfer times and uses up large
amounts of bandwidth.
In order to deal with this, we compress the audio files.
Compressing relies on encoding and decoding files for less intensive transfer.
Encoding is needed once whereas decoding is needed many times, so
encoding is allowed to take longer.
Waveform encoding – transforms signals mathematically. Perceptual encoding
– abuses certain flaws in the human auditory system.
Need to use different algorithms for live audio, otherwise we experience
interrupts
Digital Video
Easiest way of having video is with frames that consist of rectangular grids of
pixels – only allows for black and white (no shades of grey)
Using 8 bits allows us to use shades of gray for the pixels.
24 bits of color for the pixels allows us to produce 16 million different colors –
more than we can even see.
For TV’s and computer monitors, pixels are instead made of red, green, and
blue subpixels.
For television, which broadcasts at 25 frames/sec, motion isn’t steady, so
instead they use two fields, one which is broadcast on even numbers, and
the other broadcasting on odd numbers, a process known as interlacing.
Needs to be compressed like audio, done so using the MPEG standard.
Streaming
Rather than loading videos entirely before they are loaded, we use metafiles, things that
point to where we can access the video from.
Video players have jobs to do – mainly dealing with errors, decompressing, and eliminating
jitter.
For error handling, we attach parity packets to the end of our information, which
duplicates the data.
Alternate approach is interleaving, where we mix up the media and descramble it at the
end, so that if things go missing, its over a period of time rather than all at once, and hence
less noticeable.
To help eliminate jitter, we simply use a playout buffer – simply, we load some of the video
before we actually start playing it, rather than having to load and immediately display the
same data.
Livestreaming is different – data is sent as its being created, so buffer has to be larger so
things can be processed, in a way similar to the playout buffer.
Since livestreaming has many people accessing the same data, we use a method called
multicasting, where each viewer is sent a packet to a group address, with information for
audio/video being sent to this group address rather than many separate ones.
Traffic, Farms, and Proxies
Before 1994, most traffic was FTP, then became P2P(peer-to-peer) around 2000.
Traffic is highly skewed, small amounts of websites have large amounts of traffic, while
large amounts of websites have small amounts of traffic.
Server farm – collection of computer servers that provide functionality far beyond that of a
single machine.
Main problem with server farms is that the set of computers must look like a single logical
website to clients.
With server farms, we map using load balance to evenly distribute the workload.
Proxy server – Computer that acts as mediator between a web browser and the Internet.
Web proxies are used to fetch web requests on behalf of users, and are more beneficial for
popular requests.
Proxies are popular because they can also be used to filter content.
CDN’s
CDN – System of distributed servers that deliver
web content based on the location of the user.
CDN’s use a structure that has three levels, an
origin server, a node, and worldwide clients.
To support a CDN, we can use either a web
proxy, mirroring, or DNS redirection.
CDN’s themselves can be used to support
dynamic page creation, images, videos, and so
on.
Peer-To-Peer Networks
Basic idea of Peer-to-Peer file sharing is that many computers come
together and pool resources to form a content distribution system.
Computers in this system do not need to be intense, and are
commonly home computers.
Peer-to-Peer networks are self-scaling, meaning their usable upload
capacity grows in tandem with download demands from their users.
Commonly used because CDN’s have large amounts of personal
information about many people, which can then be used to
provide a better service.