Transcript
Page 1: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

1

EEC-682/782Computer Networks I

Lecture 21

Wenbing [email protected]

http://academic.csuohio.edu/zhao_w/teaching/eec682.htm(Lecture nodes are based on materials supplied by

Dr. Louise Moser at UCSB and Prentice-Hall)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 2

Outline

Review of last lectureWWW

Today’s topicsMultimedia

Assignment #2 issued todayDue May 3, 2005 (two weeks from now)Use my google mail account to turn in: [email protected]

Page 2: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

2

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 3

The World Wide Web

Architectural OverviewStatic Web DocumentsDynamic Web DocumentsHTTP – The HyperText Transfer ProtocolPerformance Enhancements

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 4

Architectural Overview

WWW consists of a vast collection of documents or Web pagesEach page may contain links to other pages. Users can follow a link by clicking on it, which then takes them to the page pointed toThe idea of having one page point to another is called hypertext

Invented by Vannevar Bush, a MIT EE professor, in 1945Browser – program used to view Web pagesHyperlinks – strings of text that are links to other pages

Page 3: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

3

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 5

URLs – Uniform Resource Locaters

URL – Uniform Resource LocatorURL encodes three types of information

What is the page called – local name uniquely indicating the specific pageWhere is the page located – DNS name of the server on which the page is locatedHow can the page be accessed – protocol, e.g., http, ftp

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 6

Statelessness and CookiesHTTP is basically statelessSometimes, it is necessary to have stateful Web client/server communicationsCookies: name derives from ancient programmer slang in which a program calls a procedure and gets something back that it may need to present later to get some work done

Some examples of cookies

Page 4: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

4

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 7

HTML – HyperText Markup Language

(a) The HTML for a sample Web page. (b) The formatted page.

(b)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 8

XML and XSL

Drawback of HTMLMixes content with formattingDoes not provide structure to Web pages

XML: eXtensible Markup LanguageDescribes Web content in a structured way

XSL: eXtensible Style LanguageDescribes the formatting independently of the content

Page 5: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

5

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 9

Dynamic Web Documents

Server-side dynamic Web page generationCGI – Common Gateway Interface

Standard interface to allow Web servers to talk to back-end programs and scripts that can accept input and generate HTML pages in response

PHP – PHP: Hypertext PreprocessorPHP scripts embeded inside HTML pages and have them be executed by the server itself to generate response page

JSP - Java Server PagesASP – Active Server Pages

Client-side dynamic Web page generationJavaScript

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 10

HyperText Transfer Protocol

HTTP – HyperText Transfer ProtocolIt specifies what messages clients may send to servers and what responses they get back in return. Each interaction consists of one ASCII request, followed by one EFC 822 MIME-like responseDefined in RFC 2616

HTTPConnection

In HTTP 1.0: make connection, sends a request, gets a response, tears down connectionIn HTTP 2.0: connection can be reused

Methods: had some provision for object-oriented programmingMessage header

Page 6: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

6

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 11

Performance Enhancement

CachingSave pages that have been requested in case they are used againClient-side technique

Server replicationReplicate server’s contents at multiple locationsSometimes called mirroring

Content delivery networksDeliver contents for their providers to end users efficiently for a feeWhole process starts with URL replacement so all contents point to a CDN serverOn receiving client’s request, the request is redirected to the closest proxy server

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 12

Multimedia

Introduction to AudioAudio CompressionStreaming AudioInternet RadioVoice over IPIntroduction to VideoVideo CompressionVideo on DemandThe MBone – The Multicast Backbone

Page 7: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

7

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 13

Introduction to Audio

The frequency range: 20Hz – 20,000HzThe ear hears logarithmically. Ratio of two sounds with power A and B is expressed in dB (decibels):

dB = 10 log10(A/B)Low limit of audibility for a 1-kHz sine wave as 0 dBOrdinary conversion is about 50 dBPain threshold is about 120 dB => a dynamic range of a factor of 1 million

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 14

Introduction to Audio

Audio waves can be converted to digital form by an ADC (Analog Digital Converter)

Quantization noise: the error introduced by the finite number of bits per sampleOn a telephone line, 8000 samples/sec, frequencies about 4kHz are lost <= Nyquist theoremAudio CDs: digitized with a sampling rate of 44,100 samples/sec (enough to capture freq. up to 22,050Hz)

The samples are 16 bits each and are linear over the range of amplitudesAllow only 65,536 distinct valuesNeeds a bandwidth of 1.411 Mbps for stereo

Page 8: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

8

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 15

Introduction to Audio

(a) A sine wave.(b) Sampling the sine wave. (c) Quantizing the samples to 4 bits.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 16

Audio CompressionTwo ways to do audio compression

Waveform coding: the signal is transformed mathematically by a Fourier transform into its frequency components.

The amplitude of each component is then encoded in a minimal way. The goal is to reproduce the waveform accurately at the other end in as few bits as possible

Perceptual coding: exploits certain flaws in the human auditory system to encode a signal in such a way that it sounds the same to a human listener, even if it looks quite different on an oscilloscope

Some sounds can mask other soundsFrequency masking: a loud sound in one frequency band can hide a softer sound in another frequency bandTemporal masking: it takes the human ear a brief period of time to hear the masked signal even after the masking signal goes awayMP3 (MPEG audio layer 3) is based on perceptual coding

Page 9: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

9

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 17

Audio Compression(a) The threshold of audibility as a function of

frequency(b) The masking effect

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 18

Streaming Audio

A straightforward way to implement clickable music on a Web page

Page 10: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

10

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 19

Streaming Audio

The media player has four major jobs to doManage the user interfaceHandle transmission errorsDecompress the musicEliminate jitter

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 20

Streaming Audio

When packets carry alternate samples, the loss of a packet reduces the temporal resolution rather than creating a gap in time.

Page 11: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

11

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 21

Streaming Audio

The media player buffers input from the media server and plays from the buffer rather than directly from the network.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 22

Streaming Audio

RTSP (Real Time Streaming Protocol) provides the mechanism for the player to control the server.

It does not provide for the data stream, which is usually RTP.RTSP commands from the player to the server.

Page 12: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

12

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 23

Internet Radio

An example radio station.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 24

Voice over IPITU recommendation for Voice of IP H.323

Visual Telephone Systems and Equipment for Local Area Networks Which Provide a Non-Guaranteed Quality of ServiceThe H323 architectural model for Internet telephony.

Page 13: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

13

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 25

Voice over IP

The H323 protocol stack.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 26

Voice over IP

G.711 – PCM system. It encodes a single voice channel by sampling 8000 times per second with an 8-bit sample to give uncompressed speech at 64 kbps

All H.323 systems must support G.711H.245 – protocol needed to allow terminals to negotiate which one they are going to use

It also negotiates other aspects of the connection such as the bit rateRTP – needed for actual data transmissionRTCP is needed for the control of the RTP channelsQ.931 – protocol for establishing and releasing connections, providing dial tones, making ringing sounds, and the rest of standard telephonyH.225 – protocol for terminals to talk to the gatekeeper

RAS (Registration/Admission/Status) channel: PC-to-gatekeeper channelThis channel allows terminals to join and leave the zone, request and return bandwidth, and provide status updates

Page 14: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

14

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 27

Voice over IP

Logical channels between the caller and callee during a call.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 28

SIP – The Session Initiation Protocol

A simpler and more modular way to do voice over IP, by IETFThe SIP methods defined in the core specification.

Page 15: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

15

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 29

SIP

Use a proxy and redirection servers with SIP.

Comparison of H.323 and SIP

Page 16: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

16

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 31

Video Analog Systems

Frame: to represent the two-dimensional image in front of it as a one-dimensional voltage as a function of time, the camera scans an electron beam rapidly across the image and slowly down it, recording the light intensity as it goes. At the end of the scan, called a frame, the beam retraces.Field: half frame with odd or even scan linesInterlacing: the technique to eliminate the flicking by displaying odd and even scan lines with increased rateNoninterlaced television or video is called progressive.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 32

Video Analog Systems

The scanning pattern used for NTSC video and television.

Page 17: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

17

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 33

Video Analog Systems

Television system standardsNational Television Standards Committee (NTSC)Phase Alternating Line (PAL)Sequential Couleur Avec Memoire (SECAM)High Definition TeleVision (HDTV)

To allow color transmissions to be viewed on black-and-white receivers, RGB signals into a luminance (brightness) signal and two chrominance (color) signals

The eye is much more sensitive to the luminance signal than to the chrominance signalsLuminance signal can be broadcast at the same frequency as old black-and-white signalTwo chrominance signals are broadcast in narrow bands at higher frequencies

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 34

Video Compression

Requirements on encoding and decodingDecoding happens a lot and it must be fastFor most of video documents, it is OK if the encoding algorithm is complex and time consumingFor real-time multimedia, encoding must also be fast and efficientEncode/decode process need not be invertible

A video is just a sequence of images plus soundA good algorithm for encoding a single image is a good starting point. When the decoded output is not exactly the same as original input, the system is said to be lossyJPEG – Joint Photographic Experts Group

Page 18: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

18

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 35

The JPEG Standard

The operation of JPEG in lossy sequential mode.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 36

The JPEG Standard

(a) RGB input data.(b) After block preparation.

Page 19: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

19

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 37

The JPEG Standard

(a) (b)

(a) One block of the Y matrix.(b) The DTC coefficients.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 38

The JPEG Standard

Computation of the quantized DTC coefficients.

Page 20: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

20

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 39

The JPEG Standard

The order in which the quantized values are transmitted

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 40

The MPEG Standard

MPEG – Motion Picture Experts GroupMPEG-1: to produce video-recorder-quality output

352x240 for NTSC, bit rate of 1.2 Mbps352x240 image with 24 bits/pixel and 25 frames/sec requires 50.7 Mbps. We need a factor of 40 compression

MPEG-2: designed for compressing broadcast-quality video into 4 to 6 Mbps. Later, MPEG-2 was expanded to support higher resolution, including HDTV

It forms the basis for DVD and digital satellite television

Page 21: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

21

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 41

The MPEG Standard

Synchronization of the audio and video streams in MPEG-1

90-kHz

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 42

The MPEG Standard

MPEG-1 output consists of four kinds of framesI (Intracoded) frames: self-contained JPEG-encoded still picturesP (Predictive) frames: block-by-block difference with the last frameB (Bidirectional) frames: differences between the last and next frameD (DC-coded) frames: block averages used for fast forward

Page 22: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

22

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 43

The MPEG Standard

I-frames: still pictures coded using a variant of JPEG, also usingfull-resolution luminance and half-resolution chrominance along each axisIt is necessary to have I-frames appear in the output stream periodically for three reasons

MPEG-1 can be used for a multicast transmission, with viewers tuning it at will. Without periodical I-frames, anyone who missed first frame could never decode any subsequent framesIf any frame were received in error, no further ecoding would be possibleWithout I-frames, while doing a fast forward or rewind, the decoder would have to calculate every frame passed over so it would know the full value of the one it stopped on

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 44

The MPEG StandardMacroblocks – 16x16 pixels in luminance space and 8x8 pixels in chrominance space.A macroblock is encoded by searching the previous frame for it or something only slightly different from itP-frames: code interframe differences. They are based on the idea of macroblocksThree consecutive frames.

Page 23: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

23

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 45

The MPEG Standard

B-frames: similar to P-frames, except that they allow the reference macroblock to be in either a previous frame or in a succeeding frame

This additional freedom allows improved motion compensation and is also useful when objects pass in front of, or behind, other objectsTo do B-frame encoding, the encoder needs to hold three decoded frames in memory at once: the past one, the current one, and the future one

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 46

The MPEG Standard

D-frames: only used to make it possible to display a low-resolution image when doing a rewind or fast forward.

Each D-frame entry is just the average value of one block, with no further encoding

Page 24: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

24

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 47

The MPEG Standard

MPEG-2: targeted at broadcast television as well as DVD

It supports both progressive and interlaced images (MPEG-1 supports only progressive images)Supports four resolution level

Low (352x240)Main (720x480)High-1440 (1440x1152)High (1920x1080)

Video on Demand

Overview of a video-on-demand system.

Page 25: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

25

Video Servers

Zipf’s law: experimentally, when N movies are available, the fraction of all requests being for the kth most popular one is approximately C/k. Here C is computed to normalize the sum to 1, namely, C = 1/(1+1/2+1/3+…+1/N)A video server storage hierarchy.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 50

Video Servers

The hardware architecture of a typical video server.

Page 26: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

26

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 51

Video on Demand

Distribution networkADSL

Bandwidth not quite big enoughFTTC – Fiber To The Curb

Telephone company runs optical fiber from the end office into each residential neighborhood, terminating in a device called an ONU (Optical Network Unit)

FTTH – Fiber To The HomeEveryone can have an OC-1, OC-3, or even higher carrier if that is required. FTTH is very expensive and will not happen for years

HFC – Hybrid Fiber CoaxCurrently being installed by cable TV providers. Uses 750-MHz coax cables

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 52

The MBone – The Multicast Backbone

MBone consists of multicast islands connected by tunnels.

Page 27: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

27

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 53

Exercises7.5. DNS uses UDP instead of TCP. If a DNS packet is lost, there is no automatic recovery. Does this cause a problem, and if so, how is it solved?7.6. In addition to being subject to loss, UDP packets have a maximum length, potentially as low as 576 bytes. What happens when a DNS name to be looked up exceeds this length? Can it be sent in two packets?7.28. Although it was not mentioned in the text, an alternative form for a URL is to use the IP address instead of its DNS name. An example of using an IP address is http://192.31.231.66/index.html. How does the browser know whether the name following the scheme is a DNS name or an IP address?

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 54

Exercises7.40. The If-Modified-Since header can be used to check whether a cached page is still valid. Requests can be made for pages containing images, sound, video, and so on, as well as HTML. Do you think the effectiveness of this technique is better or worse for JPEG images as compared to HTML? Think carefully about what ''effectiveness'' means and explain your answer.7.47. Could a psychoacoustic model be used to reduce the bandwidth needed for Internet telephony? If so, what conditions, if any, would have to be met to make it work? If not, why not?7.48. An audio streaming server has a one-way distance of 50 msec with a media player. It outputs at 1 Mbps. If the media player has a 1-MB buffer, what can you say about the position of the low-water mark and the high-water mark?

Page 28: EEC-682/782 Computer Networks I · EEC-682: Computer Networks I-Wenbnig Zhao 3 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText

28

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 55

Exercises

7.52. Can a 1-bit error in an MPEG frame affect more than the frame in which the error occurs? Explain your answer.


Recommended