Transcript web server

ECT 270
Client-side Web
Application
Development
Professor Robin Burke
Outline

Networking
Internet
 Protocols
 Addressing


Web
Protocol
 History

2
Late policy

You can turn in homework up to 3
days late


Due time = class time

3
10% per day
do not skip class to work on
homework!
What is the Internet
The Internet is an interconnected
network of thousands of networks
and computers.
( “inter-network”)
 Began in the 1960s as a Department
of Defense project
 The World Wide Web is just one of
the services that run on the Internet.

4
What is a network?


Computer system that links two or more computers To share data, info, hardware, software
Local Area Network (LAN)


Wide Area Network (WAN)


5
A collection of computers that share
hardware, software and data over a small
geographical area (home, office, school lab)
It spans a wider area (offices, schools, cities,
countries)
Connects different LANs
Networking
6
Network layers
7
Packet-switched Network
9
Protocols
Because networks use a wide variety
of hardware and software, protocols
are needed to coordinate
communication and data
transmission.
 A protocol is a set of rules for the
exchange of data across
communication lines.

11
Need for Protocol




Client programs must know how to state
requests
Server must know how to interpret
The protocol is the agreement
Important


12
A weak or inflexible protocol limits what can
be done
A complex protocol may be difficult to
implement
Addressing

The IP protocol has to know where to
send its packets


To route a packet we need its address

15
“Routing”
“IP Address”
IP Addresses

A host on the Internet must have an IP
address



Written with a dot in between


14.192.1.100
Each number ranges from 0-255


16
32-bit number
divided in four 8-bit numbers
Some addresses have a special
interpretation
127.0.0.1
IP Addresses, cont’d


In general
 the farther to the right in the address
 the closer to a particular host
14.192.1.100
 all of the machines with 14.192.1 addresses
• are probably in a LAN

all of the machines with 14.192 addresses
• might be owned by the same organization
17
Problem #1

can we run out?


Answer


yes
Solution


18
2^32 addresses
IPv6 = 128 bit addresses
starting to be available now
Problem #2
How to keep track of lots of 32-bit
numbers
 Would you rather type

207.171.183.16 or
 amazon.com


Solution

19
domain naming system
Domain Name Server

A Domain Name Server (DNS) is
responsible for the mapping between
domain names and IP addresses.
Organization name
Host name
bach.cs.depaul.edu
Organization name
20
.com
.net
.org
.it
.gov
.museum
.mil
.biz
Org. type (top level domain)
IP address: 140.192.32.50
DNS

One of the few centralized services in
a distributed Internet


Everybody must agree on what name
matches what number
Site creator must go through a domain
registration process
claim a name
 associate it with an address

21
Client/server interaction
A lot of Internet applications work
under the client/server model
 Server

knows something, or
 can do something


Client
wants to know something, or
 wants to do something

22
Client/server cont’d

Client


Server


sends response
Example: Email


23
sends request
A central computer stores and forwards
electronic mail
Client computers contact the server to get
email for a particular user
Protocols for client/server
internet applications




Simple Mail Transfer Protocol (SMTP):
transferring email messages from one
machine to another
File Transfer Protocol (FTP): transferring
files between local and remote machines.
Telnet: a terminal emulation protocol used
to login in remotely.
Telnet now superceded by ssh

24
increased security
HyperText Transfer Protocol
HTTP is the protocol responsible for
transferring and displaying web
pages.
 HTTP uses the client/server model of
computing.


The client is the user’s web browser
(I.E, Netscape)

25
The server is the web server where
the page resides. (www.nyt.com)
Client/Server Web
Interaction
26
HTTP Protocol

Request


“I want something”
Response
“Here it is”
 or “Not found”

Headers
 Body

27
A Typical HTTP Exchange
Netscape’s URL
Window
Client: Please open a connection
to ‘www.nytimes.com’ and send me
the default file. I am located at
IP Address 140.192.1.6.
NY Times
Web Server
Server: Let me check…. Okay, the
default file at this site is of type
HTML. It is 1749 bytes in size. The
date is 3/28/2004 at 23:42:33.
NY Times Web Page
HTTP Response Example
29
Uniform resource locator
• The Web uses a naming convention
called the uniform resource locator (URL).
• A URL consists of at least two and as many as
four parts.
• A simple two part URL contains the protocol
used to access the resource followed by the
location of the resource.
Example: http://www.cs.depaul.edu/
• A more complex URL may have a file name
and a path where the file can be found.
30
A Web URL deconstructed
http://josquin.cs.depaul.edu/~rburke/courses/s04/index.html
The protocol
used
domain
path that identifies
location of
document uniquely
document
name
The user is a directory
in the system
31
Note

Path may not correspond to
files/folders


80% of the time

32
The web server is free to interpret the
path however it likes
the path indicates a location in a file
system where a file is stored
Other URLs

FTP URL

ftp://[email protected]/
• Access my files on condor using File Transfer
Protocol

Email URL

mailto:[email protected]
• mailto scheme for electronic mail addresses

Newsgroup URL

news:dpu.general
• news scheme for USENET news groups and
articles
33
Prehistory of the Web
In the 1960s Douglas Englebart,
created the first experimental
hypertext system: Augment
 1984: Apple releases the HyperCard
program as part of its graphical user
interface operating system Macintosh.
 Introducing hypertext as a widelyavailable commercial product.

34
Hypertext Documents
Hypertext refers to a document that its
connected with other documents in
many ways
 Hypertext systems have been around
for a long time



Why was the web an innovation?

35
1960s
keep this question in mind
CERN and hypertext


36
In 1990 CERN, a lab for particle
Physics in Geneva, had been connected
to the Internet for 2 years. Scientists were
looking for better ways to circulate their
scientific papers and data.
Tim Berners-Lee proposed an hypertext
development project.
The birth of the Web



37
In the next two years Berners-Lee
developed the code for an hypertext
server program and made it available on
the Internet.
He envisioned the set of links to and from
computers worldwide as a spider web,
hence the name World Wide Web.
The CERN is considered the birth place of
the WWW.
What did Berners-Lee
invent?

HTTP


HTML

38
The protocol for distributing web
pages
The language for describing web
pages
HTML Documents
Most web pages are HTML
documents
 HTML



39
HyperText Markup Language
A language for describing the contents
of a hypertext page
Web browser history






A web browser is a user interface that allows users to read
(browse) HTML documents. It acts as a web client.
The first browsers were text based.
In 1993 Andreessen developed the first browser with a
graphical user interface, named Mosaic.
In 1994 Andreessen developed Netscape
In 1995 Microsoft released free Internet Explorer starting
the “Browser Wars”.
In 1998, Netscape was clearly losing. Launched mozilla.org
 Made a browser based on Netscape code open-source
40
Web Page with Interesting
Fonts, Graphics, and Layout
This figure shows a Web page is
not only a source of information,
it can also be a work of art.
graphic image
links
interesting fonts
The Web designer has a great
deal of control over the format of
the page.
41
Terminology

Web browser
 a client program that can render (display) web pages
• and other media
wide variety: text, graphical, cell phone, etc.
Web server
 a server program that responds to web requests and
delivers web pages


• and other media

42
Proxy / gateway / cache / firewall / load balancer
 Special programs or devices that are "middlemen" in
the communication between browser and server
 Improve efficiency, security, etc.
More terminology

web page


hyperlink

43
an HTML document that can be
viewed in a web browser
a special notation in an HTML
document that points to an Internet
resource
More terminology

client-side


server-side


processing that takes place within or
associated with the web server
web application

44
processing that takes place within or
associated with the web client, or browser
any software application whose mode of
delivery is the WWW
The name of this class
Client-side Web Application
Development
 We will be developing

web applications
 that make use of the browser

45
Why the Web?
The protocols that made linking
possible were open
 The concept of linking extended to an
open-ended set of Internet protocols
 The concept of inclusion of images by
a mechanism similar to linking
 The use of one-way links with minimal
bookkeeping requirements

46
Open protocols


The web protocol (HTTP) is open
Meaning





47
anyone can write a web server
anyone can write a web browser
anyone can author web pages
there is a well-defined public mechanism for
revising and extending the standard
Not true of earlier hypertext technologies
Monday
Begin HTML
 Chapters 2 and 3
 Homework due before class

48