HTTP and HTML Computer Science 01 i Introduction

  • Slides: 24
Download presentation
HTTP and HTML Computer Science 01 i Introduction to the Internet Neal Sample 30

HTTP and HTML Computer Science 01 i Introduction to the Internet Neal Sample 30 January 2001 1

We will talk about. . . • • • Domain Name System (DNS) Client/Server

We will talk about. . . • • • Domain Name System (DNS) Client/Server Relationships HTTP Web Browsers HTML 2

IP Addresses for Humans • Until now, each machine has been represented by an

IP Addresses for Humans • Until now, each machine has been represented by an ugly number (xxx. xxx) • The Domain Name Service (DNS) abstracts numeric IP addresses into something easier for humans to use • “Internet computer system white pages” 3

Domain Name System (DNS) • No packet on the net uses a computer’s “name”

Domain Name System (DNS) • No packet on the net uses a computer’s “name” for routing • A distributed database that knows the IP address of every machine on the net • Like routers, the DNS is highly decentralized • Unlike Routers, the DNS is hierarchical 4

How each machine is named • Much like a street address • Left-most part

How each machine is named • Much like a street address • Left-most part is the actual name • Several hierarchical zones becoming more and more general gates 195, Stanford University, CA, USA -vscse. stanford. edu • No geographical restriction on host names like there is with IP addresses 5

How each machine is named, II • Every machine is part of a top-level

How each machine is named, II • Every machine is part of a top-level domain § § § § . com = commercial. gov = government. edu = educational. net = networks. org = other organizations (often nonprofits). mil = military installations Two-letter country codes for geographic sites: • . au (Australia), . uk (United Kingdon), . ae (United Arab Emirates), . zw (Zimbabwe) • And the winner is? Tuvalu! 6

Name Servers • Every bottom-level domain has at least one local name server -

Name Servers • Every bottom-level domain has at least one local name server - a very busy machine • Local name servers know the IP address and name of every machine in their domain • Forward requests for unknown names up the pyramid, then back down • Local machine caches recently used IP addresses in other domains 7

More on DNS • Nearly every transaction on the net begins with a DNS

More on DNS • Nearly every transaction on the net begins with a DNS lookup • One IP address can have multiple names. Why is this nice? • DNS supports reverse lookups, so you cannot hide the machine’s ownership 8

Problems with DNS • Any one can register any domain for a small fee

Problems with DNS • Any one can register any domain for a small fee (great in theory) • This causes massive problems § Who owns american. com? Who should own it? § What about america. com? (no “n”) § Domain name resellers (greatdomains. com) • Massive political battles about this. DNS’s design shows its age and needs to evolve. • Uzi Nissan? 9

More Top Level Domains Proposed • • . biz. store. arts. web. rec. info.

More Top Level Domains Proposed • • . biz. store. arts. web. rec. info. name. sex - registered companies net-shopping sites art-related and creative sites things pertaining to the WWW recreational subject matter informational sites personal sites sex related sites 10

Building Service • Most services on the net are built using the Client/Server model

Building Service • Most services on the net are built using the Client/Server model • Client contacts the server and they exchange information following some protocol 11

Servers are: • • On all the time Usually have permanent IP addresses Generally

Servers are: • • On all the time Usually have permanent IP addresses Generally connected to the net “ 24/7” Good for: § centralization and synchronization § large amounts of data that lots of people want • What other reasons are there to centralize information on servers? 12

Clients are: • The PC you use • Good at real-time interaction § why

Clients are: • The PC you use • Good at real-time interaction § why are servers generally bad at real-time interaction? • Usually less powerful than the server • The only technical difference is that the server runs some programs that the client does not. Why? 13

Almost Home! • • We We have atoms and bits and pipes packets with

Almost Home! • • We We have atoms and bits and pipes packets with IP and TCP/IP a way to find machines with DNS our clients and servers … what do we need now, to finally browse the web? ! 14

Hypertext Transfer Protocol • Another layer of abstractions, over TCP/IP • Unifies and integrates

Hypertext Transfer Protocol • Another layer of abstractions, over TCP/IP • Unifies and integrates other protocols • Is extensible: plan for the future built in 15

How HTTP works: • Web browser makes a request for a page • Server

How HTTP works: • Web browser makes a request for a page • Server sends back the page in ASCII • Web browser reads the page and interprets codes for colors, fonts and formatting and displays the result • Browser requests any additional files (such as images) then displays them also 16

Web Browser • Made possible by increased desktop power • Know how to find

Web Browser • Made possible by increased desktop power • Know how to find pages referenced by another automatically -- big innovation • Fluent in numerous data types (pictures, sounds, fonts) • Can display multiple types at once • Wraps everything into one tidy, convenient package 17

Uniform Resource Locators (URLs) • Addresses of information on the web • Three parts:

Uniform Resource Locators (URLs) • Addresses of information on the web • Three parts: § Protocol § Host name (DNS name) § Path • A “bookmark” is a URL that your browser has saved 18

An HTTP Dialog Part I: • User types URL in browser window § http:

An HTTP Dialog Part I: • User types URL in browser window § http: //news. excite. com/odd/ • Browser does DNS lookup on host § news. excite. com • Browser contacts host via protocol § http: • Browser requests the file in the given path: § /odd/ 19

An HTTP Dialog Part II: • Server sends requested document back • Browser reads

An HTTP Dialog Part II: • Server sends requested document back • Browser reads it, requests any images or additional files needed • Server sends those files • Browser displays the page to you 20

Things to note: • Most of the work happens at the browser § requires

Things to note: • Most of the work happens at the browser § requires a relatively smart machine § server just pumps bits down the network as fast as it can • All viewing, scrolling, interaction, handled at the browser • Browser usually caches pages for speed • “Back” button doesn’t require any interaction with the server • Delete right part of the URL trick 21

Hypertext Markup Language (HTML) • • The “lingua franca” of the web Pages are

Hypertext Markup Language (HTML) • • The “lingua franca” of the web Pages are written in HTML is written in ASCII Defines the structure, not the appearance of a document § ie, HTML says “here is a title” not “print this in 30 point Times-New-Roman” § The browser determines the documents looks § Why do it this way? 22

More on HTML • Images and sounds are separate files on the server and

More on HTML • Images and sounds are separate files on the server and have their own URLs • Images are relatively large § images are fun and descriptive § slow to transmit § can turn off in most browsers • Pages can be interactive • HTML is evolving rapidly 23

Project: Say what? ! • Long live the babelfish! § http: //babelfish. altavista. com

Project: Say what? ! • Long live the babelfish! § http: //babelfish. altavista. com § French, German, Italian, Portuguese, Spanish, and English • So you want to speak Bengali? § http: //rivendel. com/~ric/resources/dictionary. html • Plane Meals? § http: //24. 2. 81. 10/fcgi-bin/anagrams. pl § http: //www. wordplays. com/ 24