0% found this document useful (0 votes)
92 views

Web Essentials: Clients, Servers, and Communication: Reference From: Web Technologies Textbook by Jeffrey C. Jackson

The document discusses the basic components and communication of the world wide web. It describes how web clients like browsers send HTTP requests to web servers, which then return HTML documents and other resources. The HTTP protocol uses a request-response model over a TCP connection. Web browsers render and cache pages for users, while web servers store and deliver web content using technologies like HTTP and HTML.

Uploaded by

studentscorners
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Web Essentials: Clients, Servers, and Communication: Reference From: Web Technologies Textbook by Jeffrey C. Jackson

The document discusses the basic components and communication of the world wide web. It describes how web clients like browsers send HTTP requests to web servers, which then return HTML documents and other resources. The HTTP protocol uses a request-response model over a TCP connection. Web browsers render and cache pages for users, while web servers store and deliver web content using technologies like HTTP and HTML.

Uploaded by

studentscorners
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Web Essentials: Clients, Servers,

and Communication
Reference from: Web Technologies Textbook
By JEFFREY C. JACKSON

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
World Wide Web
• Originally, one of several systems for
organizing Internet-based information
– Competitors: WAIS, Gopher, ARCHIE
• Distinctive feature of Web: support for
hypertext (text containing links)
– Communication via Hypertext Transport
Protocol (HTTP)
– Document representation using Hypertext
Markup Language (HTML)

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
World Wide Web
• The Web is the collection of machines
(Web servers) on the Internet that provide
information, particularly HTML documents,
via HTTP.
• Machines that access information on the
Web are known as Web clients. A Web
browser is software used by an end user
to access the Web.

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Hypertext Transport Protocol
(HTTP)
• HTTP is based on the request-response
communication model:
– Client sends a request
– Server sends a response
• HTTP is a stateless protocol:
– The protocol does not require the server to
remember anything about the client between
requests.

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
HTTP
• Normally implemented over a TCP connection
(80 is standard port number for HTTP)
• Typical browser-server interaction:
– User enters Web address in browser
– Browser uses DNS to locate IP address
– Browser opens TCP connection to server
– Browser sends HTTP request over connection
– Server sends HTTP response to browser over
connection
– Browser displays body of response in the client area
of the browser window

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
HTTP
• The information transmitted using HTTP is
often entirely text
• Can use the Internet’s Telnet protocol to
simulate browser request and view server
response

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
HTTP

Connect { $ telnet www.example.org 80


Trying 192.0.34.166...
Connected to www.example.com
(192.0.34.166).
Escape character is ’^]’.

{
Send GET / HTTP/1.1
Request Host: www.example.org

{
HTTP/1.1 200 OK
Receive
Date: Thu, 09 Oct 2003 20:30:49 GMT
Response

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
HTTP Request
• Uniform Resource Identifier (URI)
– Syntax: scheme : scheme-depend-part
• Ex: In http://www.example.com/
the scheme is http
– Request-URI is the portion of the requested
URI that follows the host name (which is
supplied by the required Host header field)
• Ex: / is Request-URI portion of
http://www.example.com/

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
URI
• URI’s are of two types:
– Uniform Resource Name (URN)
• Can be used to identify resources with unique
names, such as books (which have unique ISBN’s)
• Scheme is urn
– Uniform Resource Locator (URL)
• Specifies location at which a resource can be
found
• In addition to http, some other URL schemes are
https, ftp, mailto, and file

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Client Caching
• A cache is a local copy of information
obtained from some other source
• Most web browsers use cache to store
requested resources so that subsequent
requests to the same resource will not
necessarily require an HTTP
request/response
– Ex: icon appearing multiple times in a Web
page

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Client Caching
• Cache advantages
– (Much) faster than HTTP request/response
– Less network traffic
– Less load on server
• Cache disadvantage
– Cached copy of resource may be invalid
(inconsistent with remote version)

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Clients
• Many possible web clients:
– Text-only “browser” (lynx)
– Mobile phones
– Robots (software-only clients, e.g., search
engine “crawlers”)
– etc.

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Browsers
• First graphical browser running on
general-purpose platforms: Mosaic (1993)

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Browsers
• Primary tasks:
– Convert web addresses (URL’s) to HTTP
requests
– Communicate with web servers via HTTP
– Render (appropriately display) documents
returned by a server

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
HTTP URL’s
http://www.example.org:56789/a/b/c.txt?t=win&s=chess#para5

host (FQDN) port path query fragment

authority Request-URI

• Browser uses authority to connect via TCP


• Request-URI included in start line (/ used
for path if none supplied)
• Fragment identifier not sent to server
(used to scroll browser client area)

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Browsers
• Standard features
– Save web page to disk
– Find string in page
– Fill forms automatically (passwords, CC numbers, …)
– Set preferences (language, character set, cache and
HTTP parameters)
– Modify display style (e.g., increase font sizes)
– Display raw HTML and HTTP header info (e.g., Last-
Modified)
– Choose browser themes (skins)
– View history of web addresses visited
– Bookmark favorite pages for easy return

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Browsers
• Additional functionality:
– Execution of scripts (e.g., drop-down menus)
– Event handling (e.g., mouse clicks)
– GUI for controls (e.g., buttons)
– Secure communication with servers
– Display of non-HTML documents (e.g., PDF)
via plug-ins

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Servers
• Basic functionality:
– Receive HTTP request via TCP
– Map Host header to specific virtual host (one of many
host names sharing an IP address)
– Map Request-URI to specific resource associated
with the virtual host
• File: Return file in HTTP response
• Program: Run program and return output in HTTP response
– Map type of resource to appropriate MIME type and
use to set Content-Type header in HTTP response
– Log information about the request and response

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Servers
• httpd: UIUC, primary Web server c. 1995
• Apache: “A patchy” version of httpd, now the
most popular server (esp. on Linux platforms)
• IIS: Microsoft Internet Information Server
• Tomcat:
– Java-based
– Provides container (Catalina) for running Java
servlets (HTML-generating programs) as back-end to
Apache or IIS
– Can run stand-alone using Coyote HTTP front-end

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Servers
• Some Coyote communication parameters:
– Allowed/blocked IP addresses
– Max. simultaneous active TCP connections
– Max. queued TCP connection requests
– “Keep-alive” time for inactive TCP
connections
• Modify parameters to tune server
performance

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Web Servers
• Some Catalina container parameters:
– Virtual host names and associated ports
– Logging preferences
– Mapping from Request-URI’s to server
resources
– Password protection of resources
– Use of server-side caching

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Tomcat Web Server
• HTML-based server administration
• Browse to
http://localhost:8080
and click on Server Administration link
– localhost is a special host name that
means “this machine”

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Secure Servers
• Since HTTP messages typically travel
over a public network, private information
(such as credit card numbers) should be
encrypted to prevent eavesdropping
• https URL scheme tells browser to use
encryption
• Common encryption standards:
– Secure Socket Layer (SSL)
– Transport Layer Security (TLS)

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0
Secure Servers
I’d like to talk securely to you (over port 443)

HTTP Here’s my certificate and encryption data HTTP


Requests Requests

Here’s an encrypted HTTP request

TLS/ Here’s an encrypted HTTP response TLS/ Web


Browser
SSL SSL Server

Here’s an encrypted HTTP request


HTTP HTTP
Responses Here’s an encrypted HTTP response Responses

Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved. 0-13-185603-0

You might also like