Download Web Essentials: Clients, Servers, and Communication

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Cracking of wireless networks wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Deep packet inspection wikipedia , lookup

Lag wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Cross-site scripting wikipedia , lookup

Semantic Web wikipedia , lookup

Hypertext Transfer Protocol wikipedia , lookup

Transcript
Web fundamentals: Clients, Servers, and
Communication
The Internet
Internet: the network of networks connected
via the public backbone and communicating
using TCP/IP communication protocol
SWE 444:: based on Jeffrey C. Jackson’s slides
2
Internet Protocols
Communication protocol: how computers
talk

how you answer and end call, what language you
speak, etc.
Internet protocols developed as part of
ARPANET research

ARPANET began using TCP/IP in 1982
Designed for use both within local area
networks (LAN’s) and between networks
SWE 444:: based on Jeffrey C. Jackson’s slides
3
Internet Protocol (IP)
IP is the fundamental protocol defining the
Internet (as the name implies!)
IP address:



32-bit number (in IPv4)
connected with at most one device at a time
(although device may have more than one)
Written as four dot-separated bytes, e.g.
192.0.34.166
SWE 444:: based on Jeffrey C. Jackson’s slides
4
IP
IP function: transfer data from source device to
destination device
IP source software creates a packet representing the
data


Header: source and destination IP addresses, length of
data, etc.
Data itself
If destination is on another LAN, packet is sent to a
gateway that connects to more than one network
SWE 444:: based on Jeffrey C. Jackson’s slides
5
IP
Source
Network 1
Gateway
Destination
Gateway
Network 2
Network 3
SWE 444:: based on Jeffrey C. Jackson’s slides
6
IP
Source
LAN 1
Gateway
Destination
Gateway
Internet Backbone
LAN 2
SWE 444:: based on Jeffrey C. Jackson’s slides
7
Transmission Control Protocol
(TCP)
Limitations of IP:


No guarantee of packet delivery (packets can be
dropped)
Communication is one-way (source to
destination)
TCP adds concept of a connection on top of
IP


Provides guarantee that packets delivered
Provide two-way (full duplex) communication
SWE 444:: based on Jeffrey C. Jackson’s slides
8
TCP
Establish
connection.
{
Can I talk to you?
OK. Can I talk to you?
OK.
{
{
Send packet
with
acknowledgment.
Resend packet if
no (or delayed)
acknowledgment.
Here’s a packet.
Source
Destination
Got it.
Here’s a packet.
Here’s a resent packet.
Got it.
SWE 444:: based on Jeffrey C. Jackson’s slides
9
Domain Name Service (DNS)
DNS is the “phone book” for the Internet

Map between host names and IP addresses
Host names


Labels separated by dots, e.g.,
www.example.org
Final label is top-level domain
Generic: .com, .org, etc.
 Country-code: .us, .il,.sa, etc.

SWE 444:: based on Jeffrey C. Jackson’s slides
10
World Wide Web
Originally, one of several systems for
organizing Internet-based information
Characteristic of Web: support for hypertext
(text containing links)


Communication via Hypertext Transport
Protocol (HTTP)
Document representation using Hypertext
Markup Language (HTML)
SWE 444:: based on Jeffrey C. Jackson’s slides
11
World Wide Web
The Web is the collection of machines (Web
servers) on the Internet that provide
information, above all 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.
SWE 444:: based on Jeffrey C. Jackson’s slides
12
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.
SWE 444:: based on Jeffrey C. Jackson’s slides
13
HTTP
Normally implemented over a TCP connection
standard 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
SWE 444:: based on Jeffrey C. Jackson’s slides
14
HTTP
The information transmitted using HTTP is
often totally text
Can use the Internet’s Telnet protocol to
simulate browser request and view server
response
SWE 444:: based on Jeffrey C. Jackson’s slides
15
Client Caching
A cache is a local copy of information gets
from some other source
SWE 444:: based on Jeffrey C. Jackson’s slides
16
Client
Client Caching
Server
1. HTTP request for image
Browser
2. HTTP response containing image
Web
Server
3. Store image
Cache
SWE 444:: based on Jeffrey C. Jackson’s slides
17
Client
Client Caching
Server
This…
HTTP request for image
Browser
I need that
image
again…
HTTP response containing image
Web
Server
Cache
SWE 444:: based on Jeffrey C. Jackson’s slides
18
Client
Client Caching
Web
Server
Browser
I need that
image
again…
Get
image
Server
… or this
Cache
SWE 444:: based on Jeffrey C. Jackson’s slides
19
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)
SWE 444:: based on Jeffrey C. Jackson’s slides
20
Web Clients
Many possible web clients:




Text-only “browser”
Mobile phones
Robots (software-only clients)
etc.
We will focus on traditional web browsers
SWE 444:: based on Jeffrey C. Jackson’s slides
21
Web Browsers
Primary tasks:



Convert web addresses (URL’s) to HTTP
requests
Communicate with web servers via HTTP
make (properly display) documents returned by a
server
SWE 444:: based on Jeffrey C. Jackson’s slides
22
Web Browsers
Standard features







Save web page to disk
Fill forms automatically (passwords, CC numbers, …)
Set preferences (language, character set, cache and HTTP
parameters)
Modify display style (e.g., increase font sizes)
Choose browser themes (skins)
View history of web addresses visited
Bookmark favorite pages for easy return
SWE 444:: based on Jeffrey C. Jackson’s slides
23
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
SWE 444:: based on Jeffrey C. Jackson’s slides
24
URL
Uniform Resource Locator
Represents the address of a resource on the Internet.
Guy-Vincent Jourdan :: CSI 3140 :: based on Jeffrey C. Jackson’s slides
25
Web Standards
and the W3C Consortium
W3C – World Wide Web Consortium



takes a proactive role in developing
recommendations and prototype
technologies related to the Web
produces specifications, called
Recommendations, in an effort to
standardize web technologies
WAI – Web Accessibility Initiative
26
Web
Accessibility
WAI – Web Accessibility Initiative

Develops recommendations for




web content developers,
web authoring tool developers,
developers of web browsers, and
developers of other user agents to facilitate use of the
web by those with special needs.
Section 508 of the Rehabilitation Act

requires that government agencies must give
individuals with disabilities access to information
technology that is comparable to the access
available to others
27
Markup
Languages
SGML


Standard Generalized Markup Language
A standard for specifying a markup language or tag set
HTML


28
Hypertext Markup Language
The set of markup symbols or codes placed in a file intended
for display on a web browser.
Markup
Languages (2)
XML




eXtensible Markup Langauge
A text-based language designed to describe, deliver, and
exchange structured information.
It is not intended to replace HTML
extends the power of HTML by separating data from
presentation.
XHTML



29
eXtensible Hypertext Markup Language
Developed by the W3C as the reformulation of HTML 4.0 as an
application of XML.
It combines the formatting strengths of HTML 4.0 and the data
structure and extensibility strengths of XML.
Markup
Languages (3)
The relationship between
XHTML, HTML, and XML
HTML 4.0
XHTML
30
XML
Syntax