Professional Documents
Culture Documents
CSC 465
Data Communication and Computer Networks
CSC 465 3
Web Architecture (Cont’)
80 by default
CSC 465 4
Web Architecture (Cont’)
• Cookies
– The WWW was originally designed as a stateless entity
– Cookies are needed for extending functionalities of the Web, such as:
– To remember past client in order to show a customized webpage
CSC 465 5
Web Architecture (Cont’)
Example of Cookies:
CSC 465 6
Web Documents
CSC 465 7
Web Documents (Cont’)
1. Static Documents
• Fixed-content documents (Created and stored in a server)
• Contents of the server can be changed by the server not by user
• Static documents are prepared by using one of several language:
• Hypertext Markup Language (HTML), Extensible Markup
Language (XML), Extensible Hypertext Markup Language
(XHTML)
CSC 465 8
Web Documents (Cont’)
2. Dynamic Documents
CSC 465 9
Web Documents (Cont’)
3. Active Documents
CSC 465 11
Hypertext Transfer Protocol (HTTP)
• HTTP is a protocol used mainly to access data on the WWW
• HTTP Transaction:
HTTP uses the services of TCP, but it is a stateless protocol
CSC 465 12
Persistent/Non persistent Connections
CSC 465 13
Persistent/Non persistent Connections (Cont’)
CSC 465 14
HTTP Transaction (Cont’)
• Messages
CSC 465 15
HTTP Transaction (Cont’)
CSC 465 16
HTTP Transaction (Cont’)
Request Type
URL
Version
CSC 465 17
HTTP Transaction (Cont’)
Status Code
Status Phrase
CSC 465 18
HTTP Transaction (Cont’)
CSC 465 19
HTTP Transaction (Cont’)
Request Header
CSC 465 20
HTTP Transaction (Cont’)
Response Header
Entity Header
• Body
CSC 465 21
Examples
CSC 465 22
Persistent Connection
Proxy Server
• HTTP Supports proxy server
• It reduces the load on the original server, decreases traffic
and improves latency
Example:
CSC 465 23
File Transfer Protocol (FTP)
• File Transfer Protocol (FTP) is the standard mechanism provided
by TCP/IP for copying a file from one host to another
• It establishes two connections between hosts
One for data transfer (verities of data)
One for control information (Commands and responses)
• FTP uses the services of TCP. It needs two TCP connections
Port 21 for control connection
Port 20 for data connection
CSC 465 24
File Transfer Protocol (FTP) *Cont’+
Communication and data transfer (Cont’)
• FTP may run in active or passive mode, which determines how the data
connection is established
In both cases, the client creates a TCP control connection from a random,
usually an unprivileged, port N to the FTP server command port 21
• Active mode
• The client starts listening for
incoming data connections from
the server on port M
• It sends the FTP command PORT
M to inform the server on which
port it is listening
• The server then initiates a data
channel to the client from its port
20, the FTP server data port
CSC 465 25
File Transfer Protocol (FTP) *Cont’+
Communication and data transfer (Cont’)
• Passive mode
The client uses the control connection to
send a PASV command to the server
Then the client receives a server IP address
and server port number from the server
The client then uses to open a data
connection from an arbitrary client port to
the server IP address and server port
number received
Note: where the client is behind
a firewall and unable to accept incoming TCP
connections, passive mode may be used
CSC 465 26
Simple Mail Transfer Protocol (SMTP)
• SMTP: delivery/storage to receiver’s server
• Mail access protocol: retrieval from server
– POP: Post Office Protocol: authorization, download
– IMAP: Internet Mail Access Protocol: more features, including
manipulation of stored messages on server
– HTTP: Gmail, Hotmail, Yahoo! Mail, etc.
mail access
user SMTP SMTP user
protocol
agent Internet agent
(e.g., POP, IMAP)
SMTP
Sender’s mail Receiver’s mail
server server
CSC 465 27