View
216
Download
0
Tags:
Embed Size (px)
Citation preview
2
We will talk about...
• Domain Name System (DNS)• Client/Server Relationships• HTTP• Web Browsers• HTML
3
IP Addresses for Humans
• Until now, each machine has been represented by an ugly number (xxx.xxx.xxx.xxx)
• The Domain Name Service (DNS) abstracts numeric IP addresses into something easier for humans to use
• “Internet computer system white pages”
4
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
5
How each machine is named
• Much like a street address• Left-most part is the actual name• Several hierarchical zones becoming more
and more generalgates 195, Stanford University, CA, USA
-vs-cse.stanford.edu
• No geographical restriction on host names like there is with IP addresses
6
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!
7
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
8
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
9
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?
10
More Top Level Domains Proposed
• .biz - registered companies• .store - net-shopping sites• .arts - art-related and creative sites• .web- things pertaining to the WWW• .rec - recreational subject matter• .info - informational sites• .name - personal sites• .sex - sex related sites
11
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
12
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?
13
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?
14
Almost Home!
• We have atoms and bits and pipes• We have packets with IP and TCP/IP• We have a way to find machines with
DNS• We have our clients and servers
… what do we need now, to finally browse the web?!
15
Hypertext Transfer Protocol
• Another layer of abstractions, over TCP/IP
• Unifies and integrates other protocols
• Is extensible: plan for the future built in
16
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
17
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
18
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
19
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/
20
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
21
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
22
Hypertext Markup Language (HTML)
• The “lingua franca” of the web• Pages are written in HTML• 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?
23
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
24
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/