Download Chapter 1

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

Server Message Block wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Cross-site scripting wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Lag wikipedia , lookup

Hypertext Transfer Protocol wikipedia , lookup

Transcript
CHAPTER 1
LAB 1.1 Web Server
Free Powerpoint Templates
Page 1
CONTENTS
•
•
•
•
Client/Server Basics
Electronic Publishing
HTTP Overview
Other Web-Related Servers
Free Powerpoint Templates
Page 2
CLIENTS AND SERVER
•
describes the relationship between
two computer programs in which one
program, the client, makes a service
request from another program, the
server, which fulfills the request
CLIENT
• Client- a piece of hardware/software
used to communicate with a date
provider (server)
• Only one user uses a specific client at
a time
SERVER
• Physical computer refer to the actual
server software/daemon running on
the machine
• Daemon- a program that offers
services to other programs, usually
over a network.
Free Powerpoint Templates
Page 3
World Wide Web (WWW)
• Uses this client/server model to allow millions of
users to access Web sites all over the world
WEB SERVER:
• Is a specific type of server that knows how to
communicate with clients using the HyperText
Transfer Protocol (HTTP)
– A protocol- a standard set of rules that allow a client
an server to communicate.
– Allows clients to request documents and servers to
respond with those documents.
Free Powerpoint Templates
Page 4
Video – Word Wide Web
Free Powerpoint Templates
Page 5
TCP/IP Network
Connections/Ports
•
Transmission Control Protocol/ Internet
Protocol (TCP/IP)
• Allows different types of computers to
communicate at a low level
;it is up to applications, however to determine how
client/server talk
• Uses IP Addresses to communicate between
computers
• The destination computer may have many
different services running on it, so to specify
which service we want to communicate with, we
must use a PORT NUMBER
Free Powerpoint Templates
Page 6
Server and Browser
• The main goal of any
Web server – to
provide documents
to clients
• To retrieve and
display information
from a Web Server
by using HTTP
• A browser allows any
user to access a
server easily.
Free Powerpoint Templates
Page 7
Browser Plug-Ins
• Extends browser capability
• More than just HTML
– RealPlayer - live audio and video
– Shockwave - animations
– Acrobat Reader - view PDF files
Free Powerpoint Templates
Page 8
LAB 1.2
Electronic Publishing
Free Powerpoint Templates
Page 9
• Strength of the Web
- The support of hypertext
documents
- Contains hyperlinks that allow
the reader to jump easily from
one document to another or to
move around the current
document
- Allow users to follow a specific
thread or view quickly
documents on related topics
- Links can be images, sounds,
animations, and even videoscalled hypermedia
Free Powerpoint Templates
Page 10
Two File Types
• In the Web-publishing realm, two
types of files:
• ASCII text files
– Can be HTML
– Plain text or some other simple
format
• Binary Files
– Images
– Sounds
– Programs
Free Powerpoint Templates
Page 11
Image File Type- GIF
• Graphics Interchange Format
(GIF)
– 256 colours
– Lossless compression
– Transparency
– Can be animated
– Good for illustrations
– Proprietary (patent)
Free Powerpoint Templates
Page 12
Image File Types (PNG & JPEG)
• Portable Network Graphics
(PNG)
– As GIF except:
• More colours
• No animation
• Not proprietary
• Joint Photographic Experts
Groups (JPEG)
• Millions of colours
• Lossy compression
• Good for photographs
Free Powerpoint Templates
Page 13
Audio File Types
• WAV
– Windows
• AIFF
– Macintosh
• AU
– Unix
• Modern browsers support all these and
more
Free Powerpoint Templates
Page 14
MIME Types
• Multipurpose Internet Mail Extensions (MIME)
– A type of a file before it sends it to the browser
– The browser can use the MIME type to determine how it should
display the document.
– Both server/client must have a simple MIME types database.
– There are 7 different media types in use:
•
•
•
•
•
•
•
Application
Audio
Image
Message
Multipart
Text
Video
= application/excel
= audio/midi
= image/jpeg
= message/news
= multipart/digest
= text/html
= video/mpeg
Free Powerpoint Templates
Page 15
Sample – Fantastic Website
Free Powerpoint Templates
Page 16
LAB 1.3
HTTP Overview
Free Powerpoint Templates
Page 17
HTTP TRANSACTIONS
• HTTP
– Protocol that allows Web browsers to talk to
servers and exchange information
– Provides a standard way of communicating
between browsers and Web servers
– Expects the client to initiate a request and the
server to respond
– Each request has THREE parts: the request
or status line, the header fields, and the
entity body
Free Powerpoint Templates
Page 18
HTTP REQUEST
REQUEST LINE
Request method, Resource location,
Protocol Version
Information about request, client
HEADER SECTION
Data to be passed to the server
ENTITY BODY
Free Powerpoint Templates
Page 19
HTTP Response
• The server then responds to the request in
a similar fashion
STATUS LINE
Status code, reason phrase, protocol
version
Information about server, response
HEADER SECTION
Requested resource-often HTML
ENTITY BODY
Free Powerpoint Templates
Page 20
REQUEST METHOD
The request line of a client request contains an HTTP command called
REQUEST METHOD
• GET
– Used to retrieve information from the server
– Can be used to pass data to the server
• HEAD
– Identical to the GET method except that the server does not return a
document
– It returns the header section for the request
– Use to verify the existence of a resource
• POST
– Allows the server to receive data from the client
– Typically used to send the data in HTML forms to the server for
processing.
– Passes data to the server in the entity body of the request
Free Powerpoint Templates
Page 21
OTHER METHODS
• PUT
– Used for publishing documents to the Web
server from a client
• DELETE
– Is used to remove a document from a Web
server.
Free Powerpoint Templates
Page 22
SERVER RESPONSES
• After an HTTP server receives a request
• It attempts to process the request
• The server response like the client
request:
– The status line
– Header fields
– The entity body
Free Powerpoint Templates
Page 23
Status Line
• The status line contains three things
– the protocol version
– The status code
• A three-digit integer result code defined by the
HTTP specification
• The first digit of the status code represent the
category of the response ( go next slide)
– A description phrase
Free Powerpoint Templates
Page 24
Five categories of the Status Code
• Informational
– The request was received and is being processed
• Success
– The client request was successful
• Redirection
– the client request was not performed; further action must be
taken by the client
• Client Error
– The client’s request was incomplete or incorrect and cannot be
fulfilled
• Server Error
– The request was not fulfilled, due to a server problem
Free Powerpoint Templates
Page 25
Most common Response Code
• 100 Continue
– The initial part of the request has been received and
the client should continue
• 200 OK
– This is probably the most common response
– It means that the client’s request was successful and
the server’s response contains the resource
requested.
• 400 BAD Request
– The server could not understand the request
Free Powerpoint Templates
Page 26
HTTP Headers
• Is used to transfer information between the
client and server
• A header has a name and a value
associated with it
• Examples of HTTP headers( 2 categories):
– CLIENT REQUEST HEADERS
– SERVER RESPONSE HEADERS
Free Powerpoint Templates
Page 27
CLIENT REQUEST HEADERS
Accept
Used to specify which media types the client
prefers to accept
Cookie
Contains cookie information for the URL requested
If-Modified-Since
Used to do a conditional GET request.
The server will return the document only if it has
been modified since the date specified
Referer
Allows the client to specify the URL of the page
from which the currently requested URL was
obtained
User-Agent
Contains information about the client program
originating the request.
Used to identify the browser software.
Free Powerpoint Templates
Page 28
SERVER RESPONSE HEADER
Server
Contains information about the server
software handling the request
Set-cookie Allows the server to set a cookie on
the client browser for the given URL
or domain
Free Powerpoint Templates
Page 29
ENTITY HEADERS
Content-Length Specifies the sixe of the data
transferred in the entity body
Content-Type
Specifies the MIME type of the
data returned in the entity body
Expires
Specifies the time/date after
which the response is considered
outdated.
Last-Modified
Specifies the date and time the
document was last modified
Free Powerpoint Templates
Page 30
LAB 1.4
OTHER WEB-RELATED SERVERS
Free Powerpoint Templates
Page 31
PROXY SERVER
•
•
Intermediary server that goes
between a client and the destinationa middleman
Three main uses:
– Security
• Firewall
• Allowing only HTTP traffic
through and rejecting other
protocols.
– Content filtering
• Filter data, restricting access
to certain sites or analyzing
content for questionable
material
– Caching
• Help improve performance by storing
frequently accessed documents
Free Powerpoint
locally.
Templates
Page 32
STREAMING AUDIO AND VIDEO
• For a browser to play
an audio/video file, it
must first download
the entire file.
Free Powerpoint Templates
Page 33
FILE TRANSFER PROTOCOL
• File Transfer Protocol (FTP)
– Used to transfer files
between computers on a
network.
– A host with a Web server
running on it may also set
up an FTP server
• FTP DAEMON
- A program that runs on the
server and allows clients to
connect
- Provides a means of
authentication so that only
authorizes users can transfer
files to and from the server
Free Powerpoint Templates
Page 34
DATABASES
• Stores details in
fields on a server so
that they can later
called.
Free Powerpoint Templates
Page 35
SSL
• Secure Sockets Layer
• A protocol developed by Netscape
for transmitting private documents
via the Internet.
• SSL uses a cryptographic system
that uses two keys to encrypt data
− a public key known to everyone
and
- a private or secret key known
only to the recipient of the
message.
Free Powerpoint Templates
Page 36
THE END
Free Powerpoint Templates
Page 37