digital multimedia, 2nd edition nigel chapman & jenny chapman chapter 17 this presentation ©...

21
Digital Multimedia, 2nd edition • Nigel Chapman & Jenny Chapman • Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

Upload: bruno-lindsey

Post on 12-Jan-2016

230 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Digital Multimedia, 2nd edition

• Nigel Chapman & Jenny Chapman

• Chapter 17

• This presentation © 2004, MacAvon Media Productions

Multimedia and Networks

Page 2: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Rules governing the exchange of data over networks

• Conceptually organized into stacked layers– Application-oriented services (e.g. file

transfer, Web browsing)– Transfer of raw data– Physical signals over wires, optical fibres, etc.

Protocols

591

Page 3: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• TCP/IP networks, including the Internet, are packet-switched networks– Messages split into small pieces called

packets, sent separately– Messages are multiplexed– Enables network bandwidth to be shared

efficiently between many messages

Packets

591

Page 4: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Internet Protocol, defines– Basic unit of transfer, datagram– Mechanism for getting datagrams from

source to destination host through a network of networks, via routers

• Hosts are identified by IP addresses– Set of four numbers, uniquely identifying

the network and host

IP

592–593

Page 5: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Attempts to deliver each datagram individually from source to destination host

• Datagrams not delivered after specified time are discarded– Message may arrive with some packets

missing

• Routes calculated dynamically– Packets may arrive in the wrong order

IP

593

Page 6: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Transmission Control Protocol

• Provides reliable delivery of sequenced packets– Requests retransmission of missing packets– Puts packets back into correct order

• Based on acknowledgements, using a sliding window of unacknowledged packets– May lead to some packets being sent more than

once

TCP593–594

Page 7: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Packets must be sent to the right application (e.g. Web browser, not email client)– IP address only identifies right host

• IP address extended with a port number, identifying an application running on the host

• IP address + port number = transport address

Transport Addresses

595

Page 8: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• User Datagram Protocol

• Ensures packets are delivered to right application– Uses transport addresses

• Does not guarantee delivery– Suitable for networked multimedia where

lost packets more acceptable than overhead of TCP

UDP

595–596

Page 9: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Real-Time Transport Protocol

• Runs on top of UDP, adds extra features for sequencing etc

• Header identifies the type of payload (video, audio, etc)

– Format of payload optimized for the type of data

• Sequence numbers and timestamps used to reorder packets and synchronize separately transmitted streams

RTP596–597

Page 10: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Unicast – server sends a copy of e.g. video data stream to every client– Many copies of the data sent over network

• Multicast – server sends a single copy, which is only duplicated when necessary, when routes to different clients diverge– Hosts must be assigned to host groups, using a

range of reserved IP addresses– Needs enhanced routers

Multicasting597–599

Page 11: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

Unicasting and Multicasting

598

Page 12: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• HyperText Transport Protocol

• Client opens TCP connection to the server– Server's name is usually extracted from a

URL, mapped to an IP address via DNS

• Client sends a request and receives a response– Requests and responses are both messages

HTTP

600–601

Page 13: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• String of 8-bit characters

• Request line (request) or status line (response)

• One or more headers

• Blank line

• Body (optional)

HTTP Messages

601

Page 14: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Request line

– Method – name of service being requested

• e.g. GET

– Identifier – resource being requested

• e.g. path name of a file

– Version

• e.g. HTTP/1.1

• e.g. GET DMM2/links/index.html HTTP/1.1

HTTP Requests

601

Page 15: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Header name : arguments• Host: www.digitalmultimedia.org

• Connection: keep-alive

• User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85 (KHTML, like Gecko) Safari/85

• Accept: */*

• Accept-Language: en-us, ja;q=0.33, en;q=0.67

• etc

Headers

601–602

Page 16: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Status line– Protocol version– Numerical status code

• 200 = OK, 400 = bad request, 404 = not found, etc

– Status description

• e.g. HTTP/1.1 200 OK

HTTP Responses

602–603

Page 17: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Headers – same format as for requests– e.g. Server: Apache/1.3.27 (Darwin)

• Body contains data, e.g. HTML code of a requested page

HTTP Responses

602

Page 18: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Copies of pages that have been retrieved are kept in a cache on user's machine or proxy– How to tell if version on server is newer than

version in the cache?

• If-Modified-Since header in conditional request

• Status = 304, Not Modified– Browser displays page from cache

Caching

604–605

Page 19: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Real Time Streaming Protocol• 'Internet VCR remote control'

– Start, stop, pause media stream– Go to point identified by timecode– Schedule time to start display

• Messages syntactically similar to HTTP• Data stream transmitted separately

(using RTP)

RTSP

606

Page 20: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Quantifies the amount of– Delay– Jitter– Packet loss– an application can tolerate

• ATM (Asynchronous Transfer Mode) networks can offer QoS guarantees

Quality of Service (QoS)

609–611

Page 21: Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks

• Allows an HTTP server to communicate with other resources (e.g. databases) to generate Web pages dynamically

• CGI (Common Gateway Interface)– Receives data from HTTP request (e.g.

form data)– Returns HTTP response

• PHP, ASP, JSP, ColdFusion, etc

Server-side Computation

611–614