Transcript Chapter 1

Chapter 15
Multimedia and Networks
Multimedia Systems
Key Points
 IP
is the Internet Protocol and
transfers datagrams between hosts
that are identified by IP addresses.
 TCP is layered on top of IP, to
provide reliable delivery of
sequenced packets.
 UDP is also layered on top of IP, and
provides a more efficient method of
delivery, but it is not reliable.
Key Points
RTP runs on top of UDP and provides
additional services for real-time delivery
of data of different payload types.
 Multicasting cuts down network traffic by
sending packets to host groups, only
creating duplicates when it is necessary.
(Contrast unicasting.)
 HTTP is used to transmit data between
Web servers and clients. The client sends
a request and gets a response.

Key Points
A GET request is used to retrieve a Web
page. The response includes the status
and, if it was successful, the text of the
page is included in the body of the
response.
 HTTP includes a cacheing mechanism to
help reduce network traffic.
 RTSP is like an `Internet VCR remote
control', providing control functions for
RTP streams used for video etc.

Key Points
 Quality
of Service provides a
measure of how well a network can
deliver streamed data.
 Server-side scripting is used to
enable an HTTP server to
communicate with other resources,
and pass the results back to a client.
The Common Gateway Interface
(CGI) provides a mechanism for this.
Introduction
 The
relationship between computer
networks and multimedia is a
contradictory one:
– they are incompatible perfect partners
Multimedia
 Files
are often very large
 Complex processing such as
decompression
may be required
 Response times must be short and
tight
 Synchronization constraints must be
respected
Networks
 Networks
are particularly poorly
placed to
satisfy those demands, because of
– inherent limitations of present day
technology
– complex and unpredictable effects of
the interactions between network
components and patterns of network
traffic
Protocols
 Protocols
are the rules governing
the exchange of data over network
 They are conceptually organized
into layers,
stacked on top of each other
 The protocols on each layer are
implemented using those on the
layer below
Protocols
 The
lowest layer protocols deal with
the actual physical signals
transmission
 Higher level protocols handle the
transfer of packets of raw data and
ensure they reach their correct
destination
 The highest layers implement more
application-oriented services
TCP/IP Networks
 Packet-switched
–
Networks
all messages are split into small pieces, called
packets, which are sent separately
 Advantage
–
enable network bandwidth to be shared
efficiently between many messages
 Disadvantage
–
can’t guarantee network quality
Internet Protocol
 IP
is the Internet Protocol, which
makes the Internet possible
 All that IP does is attempt to deliver
individual datagrams from one host
to another. It doesn't even
guarantee to succeed
Transmission Control Protocol
 TCP
, the Transmission Control
Protocol, is layered on top of IP
 TCP provides reliable delivery of
sequence packets. It does this using
a system of acknowledgement
Transmission Control Protocol
 Acknowledgement
– when the destination receives a packet,
it sends an acknowledgement to
sender
– if the acknowledgement is not received
within a specified period of time (the
time-out), the packet is sent again
– the mechanism of acknowledgement
achieves the reliability of transmission
Transmission Control Protocol
 Sliding
window
– instead of sending a single packet and
waiting for an acknowledgement, it allows
the sender to transmit multiple packets
before waiting for an acknowledgement
Initial window
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
Acknowledgement
window slide
1
2
Transmission Control Protocol
 TCP
is less efficient than IP, because it
adds extra overheads in
acknowledgements and
retransmission
 For some networked multimedia
applications, the possibility of lost
packet is more acceptable than the
overhead of TCP
User Datagram Protocol
UDP, the User Datagram Protocol, is
built on top of IP, like TCP, but is much
simpler
 Like IP, UDP only tries its best to deliver
datagrams, it does not offer reliable
delivery provided by TCP
 UDP is a suitable basis for delivering
data such as streamed video and audio,
for which real-time constraints are more
important than totally reliable delivery

Real-time Transport Protocol
 The
low-cost delivery of UDP is not
enough for delivering streamed
video and audio
 The Real-time Transport Protocol
(RTP) typically runs on top of UDP,
adding extra features that are
needed for sequencing identifying
and synchronization
Real-time Transport Protocol
 sequence
number
– Each packet has a sequence number to enable
applications to
reconstruct a sequence of packets and detect
whether any are missing
 timestamp
– It records the instant at which the first byte
contained in a packet was sampled
– Synchronization can be collated with the
timestamps to ensure that simultaneously
sampled data is played back at the same instant
Multicasting
A
common situation where data is
unnecessarily duplicated arises when a
group of Internet users require access
to the same resource at the same time
 Conventional (unicast) transmission
require that the server from which the
video is being streamed send a copy of
it to everybody who has set up a
connection
Multicasting
 In
multicasting, a single packet is
sent and is duplicated along the
way whenever routes to different
users diverge
Application Protocols for Multimedia
 Higher
level protocols must run on
top of the network and transport
protocols to provide services
suitable for distributed multimedia
applications
– HTTP (Hypertext Transfer Protocol)
 the
basis of the World Wide Web
– RTSP (Real Time Streaming Protocol)
a
newer protocol designed to control
streamed media
HTTP
 Interaction
between a Web client and
server over HTTP:
– Client/Server model
 To
start things off, the client opens a TCP
connection to a server
 the client sending requests, which are met
by responses from the server
HTTP
 HTTP
requests and responses are
collectively known as messages
 Both consists of a string of 8-bits
characters, so they can be treated
as text by programs that read them
HTTP
 Messages
structure
conform to a simple rigid
– initial line
 request
line (for a request)
 status line (for a response)
– one or more headers
 containing
modifiers
various parameters and
– body
 containing
data, such as the contents of a
file being sent by the server
HTTP

A request line comprises three elements
– method identifies the service being requested,
the most commonly used method is GET
– identifier tells the server which resource is
being requested
– HTTP version indicates which protocol version
the client is using
GET /compbooks/chapman/index.html HTTP/1.1
HTTP
 Headers
take the form of a header
name followed by a colon and some
arguments
Host: www.wiley.com
User-Agent: Mozilla/4.0
 One
of the most commonly seen
headers in GET requests is Accept,
which indicates the range of types of
data that the browser can deal with
Accept: image/gif, image/jpeg
Accept: */*
HTTP
 Status
line also comprises three
components
– protocol version tells the client which
HTTP version the server is using
– status code
– short phrase explains to human readers
what the status code means
HTTP/1.1 200 OK
RTSP
 RTP
does not provide all the
necessary functionality required for
streamed data
– we usually want to be able to
 start,
stop and pause them, and possibly go
to a particular point in the stream (for
streams that are not being transmitted live)
 for live streams, we might want to schedule
a time at which to start the display
RTSP
 RTSP
is intended to provide these
services. It is often described as
“Internet VCR remote control
protocol”
 Syntactically, RTSP closely
resembles HTTP with request and
status lines and headers
RTSP
 In
the simplest mode of operation,
an RTSP client sends
– PLAY requests to cause the server to
begin sending data
– PAUSE requests to temporarily halt it
 Note
that the media data is
transmitted separately, often using
RTP; RTSP merely coordinates the
transmission
Relationships between TCP/IP
protocols used for multimedia
HTTP
RTSP
RTP
TCP
UDP
IP
Quality of Service
Delay
 Variation in delay is called jitter

– Two problems
 Variation
in time between packets can
result in time base errors
 Loss of synchronization of several streams
– Lip-sync
Loss
 Measurable quantities

– delay, jitter, loss
ATM

Asynchronous Transfer Mode
– Offer guarantees about the quality of services
– Much more like a circuit-switched network

Integrated Services Architecture
– Different classes of services
 Best
effort
 Guaranteed

RSVP
– Resource Reservation Protocol
Server-side Computation
 Client-side
scripting
 Server-side scripting
– Common Gateway Interface (CGI)
CGI
A
mechanism for server to pass on
data in a client’s request to a script
– CGI script
 Three
places
– Headers in HTTP request
– Query string
– POST