Web Essentials: Clients, Servers, and Communication

Download Report

Transcript Web Essentials: Clients, Servers, and Communication

SWE 444
Internet and Web Application Development
Introduction to Web Technology
Dr. Ahmed Youssef
Internet
It is a network of networks connected and
communicating using TCP/IP communication
protocol
2
Computer Networks
Ahmed Youssef:: SWE444: Internet and Web Application Development
3
Brief History of the Internet
 1968 - DARPA (Defense Advanced Research Projects Agency) contracts
with BBN (Bolt, Beranek & Newman) to create ARPAnet
 1970 - First five nodes:





UCLA
Stanford
UC Santa Barbara
U of Utah, and
BBN
 1974 - TCP specification by Vint Cerf
 1984 – On January 1, the Internet with its 1000 hosts converts
to using TCP/IP for its messaging
A Brief Summary of the
Evolution of the Internet
???
Assignment
Intranet & Extranets
Intranet

A private network contained within an
organization or business used to share
information and resources among coworkers.
Extranet

A private network that securely shares part of an
organization’s information or operations with
external partners
Intranet & Extranets
7
Intranet & Extranets
Ahmed Youssef:: SWE444: Internet and Web Application Development
8
Components of Web
Web Page and Web Site
Web Browsers and Web Servers
Uniform Resource Locator(URL)
HTML
HTTP
Internet Protocol
9
Web Page vs Website
A web page is a part of a complete web site. It
is a document or information resource that is
suitable for the World Wide Web and it can be
accessed through a web browser.
Websites can consist of few web pages or
many hundreds of web pages.
Ahmed Youssef:: SWE444: Internet and Web Application Development
10
Web Browser
It's a software
It lets you visit webpages
and use web applications
Types:






Internet Explorer
Mozilla Firefox
Netscape Navigator
Google Chrome
Opera
…
Web servers
The term web server can refer to either the
hardware (computer) or the software
(computer application) that helps to deliver
web content that can be accessed through the
Internet.
The web server hosts pages, programs, and
multimedia files and serves them using HTTP,
a protocol designed to send files to web
browsers and other protocols.
12
Accessing a web site
Client computer
Server computer
Internet
connection
Web browser
Web server
Database server
HTML
HyperText Markup Language
HTML is a coding language used to create
hypertext/hypermedia documents known as
web pages.
Hypertext documents are documents that can
contain links to other hypertext documents.
Ahmed Youssef:: SWE444: Internet and Web Application Development
14
HTTP
Hypertext Transfer Protocol
Provides a standard for Web browsers and
servers to communicate.
Set of rules for transferring files (text,
graphic images, sound, video, and other
multimedia files) on the World Wide Web.
Ahmed Youssef:: SWE444: Internet and Web Application Development
15
Hypertext Transport Protocol
(HTTP)
Protocol for HTML retrieval of and other
documents from website throughout the
Internet.
HTTP is based on the request-response
communication model:


Client sends a request
Server sends a response
16
Client Server
Server
Request
Response
Client
Client
Client
Client/Server Computing
Client/Server Processing with Request-Response Cycle
Request Message
Client Program
Response Message
Server Program
Client PC
File Server
Web-Enabled Application
HTTP Request Message
Client is Browser
HTTP Response Message
Server Program
Web-enabled applications:
Form of client server processing
that uses browsers as clients.
Client PC
E-Mail Server
Internet Protocols
What is a protocol?
 A set of rules governing the exchange of data
between two or more hosts.
The Internet Protocol (IP) is the method
or protocol by which data is sent from one
computer to another on the Internet.
20
Internet Protocol address
(IP address)
It is a usually numerical label assigned to
each device participating in a computer
network that uses the Internet Protocol for
communication.
IP address:



32-bit number (in IPv4)
Written as four dot-separated bytes,
e.g. 212.138.86.31 (www.uoh.edu.sa)
Transmission Control Protocol
(TCP)
TCP enables two hosts to establish a connection
and exchange streams of data.


Provides guarantee that packets delivered
Provide two-way (full duplex) communication
22
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.
23
Uniform Resource Locator
URL is a standard way to specify the location of a resource
URLs are the unique addresses of Internet Resources.
A URL is divided into four parts.
Transfer protocols
 Server name
 Directory path
 File name

24
General URL syntax
<scheme>:<scheme-dependent-information>
Scheme examples:
– http
– ftp
– news
(Hyper Text Transfer Protocol)
(File Transfer Protocol)
(News protocol)
scheme://Server name/path/filename
Example
http://www.uoh.edu.sa/a.khedr/swe444.html
Transfer Protocol:
Server name:
Directory Path:
File name:
Ahmed Youssef:: SWE444: Internet and Web Application Development
26
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, .sa, .eg, etc.
http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
27
Types of Web Sites
Static:

It contains a fixed amount of pages and the
information is presented in HTML.
Dynamic:

the content changes every time the page loads.
This change in content will directly be related to
the latest updated information present on the
database .
Ahmed Youssef:: SWE444: Internet and Web Application Development
28
Accessing static web pages
“Static” – the contents don’t change (unless they’re
edited).
Web pages (text files) and other needed files (e.g.
images) are stored as files on the web server and are
retrieved as needed in response to HTTP requests
Client
Server
HTTP request
Browser
Web server
HTTP response
HTML file
Types of web sites based on content
Information
Search Engines
Educational
Forums
Company
Online shops
…
Ahmed Youssef:: SWE444: Internet and Web Application Development
30
The World Wide Web (WWW)
The World Wide Web consists of all the public
Web sites connected to the Internet worldwide
The Web consists of three distinct technologies



Hyper Text Mark-up Language(HTML)
Hyper Text Transport Protocol (HTTP)
Uniform Resource Locators (URLs)
Difference Between Internet and Web?
World Wide Web is the Multimedia portion of
the Internet

Images, video, sound, animation, etc.
Technically the Web is the portion of the
Internet that contains Web Servers, and Web
Sites.
Client Caching
A cache is a local copy of information gets
from some other source
33
Client
Client Caching
Server
1. HTTP request for image
Browser
2. HTTP response containing image
Web
Server
3. Store image
Cache
34
Client
Client Caching
Server
This…
HTTP request for image
Browser
I need that
image
again…
HTTP response containing image
Web
Server
Cache
35
Client
Client Caching
Web
Server
Browser
I need that
image
again…
Get
image
Server
… or this
Cache
36
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)
37
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)
38
Secure Servers
I’d like to talk securely to you (over port 443)
HTTP
Requests
Here’s my certificate and encryption data
HTTP
Requests
Here’s an encrypted HTTP request
Browser
TLS/
SSL
Here’s an encrypted HTTP response
TLS/
SSL
Web
Server
Here’s an encrypted HTTP request
HTTP
Responses
Here’s an encrypted HTTP response
HTTP
Responses
39