Unit v

A
APARNA PASSISTANT PROFESSOR em VELAMMAL ENGINEERING COLLEGE
VELAMMAL ENGINEERING COLLEGE
An Autonomous Institution, Affiliated to Anna University Chennai, & Approved by AICTE Delhi
CS8591 COMPUTER NETWORKS
UNIT V
APPLICATION LAYER
Part I – WWW and HTTP
5.1. World Wide Web
• Web is the repository of documents called web pages
• World Wide Web can be defined in two terms as distributed and linked
• Distributed refers to the extension of the web whereas linking refers to
retrieving of one web page from other
• Linking of web page is achieved by a concept called hypertext
• Hypertext – Linked text documents
5.1.2 Architecture of WWW
• WWW is a distributed client server service.
• Client access server through browser
• Server provided over different web pages called sites
• Web pages can be simple or composite
• Composite web page have links to other web pages.
• Simple web page have no link to other web pages
Web Client (Browser)
• Web Client access resources through web browser
• Web browser consists of 3 parts:
– Controller
– Client protocol
– Interpreters
• Controller receives input from input device
• Using interpreter, browser displays the document on to the screen
• Based upon application, it uses the appropriate protocol
Fig: Composite Link
Fig: Browser
Web Server
• Collection of web pages stored in a server is called web server.
• Each time a request arrives, the corresponding document is sent to the
client.
• To improve efficiency, servers normally store requested files in a cache in
memory; memory is faster to access than a disk.
• A server can also become more efficient through multithreading or
multiprocessing.
• In this case, a server can answer more than one request at a time.
• Some popular web servers include Apache and Microsoft Internet
Information Server.
5.1.3 Uniform Resource Locator (URL)
• A web page, as a file, needs to have a unique identifier to distinguish it
from other web pages.
• To define a web page, we need three identifiers: host, port, and path
• In addition to this we also need to specify the protocol
Example:
• Protocol://host/path (Normal)
• Protocol: //host: port/path (for specific application)
• www:// www.mhh.com/compsci
Protocol:
• It is the abbreviation of client server program that need to access web page
• Example: HTTP
Host:
• It is the IP address of the server or domain name
Port:
• It is a 16-bit integer predefined
Path:
• It identifies location and name of the file in the underlying operating system
Web Documents
• www documents are classified into three categories:
– Static
– Dynamic
– Active
Static Documents:
• Fixed size documents created and stored in server
• Client can access only copy of the documents.
• User has no right to change content over the document
• It can be modified by the privileged users
• Example: Document viewed through browser
• Static documents are HTML, XML, XSL, and XHTML for its creation
Dynamic Documents:
• Created by the web server on behalf of the request from user
• Web server runs on application program and creates the document
• Example: Date and time retrieval from server (Date and time are dynamic
information)
• Dynamic documents are JSP, ASP, Cold fusion with SQL
Active Documents:
• Programs that run on client site are called active documents
• Example: Run a program that interacts with the user (Graphics)
• Active documents use Java Applets
5.2 Hyper Text Transfer Protocol (HTTP)
• It is the protocol used to retrieve specific web page from the web
• HTTP client sends request, HTTP server returns a response
• Well-known port number of HTTP at server side is 80
• Since HTTP use TCP, it is connection oriented and reliable protocol
• The requested web pages can be located at different server.
• So different methods must be employed to retrieve each object using TCP
connection
• There are two types of connections involved in this operation:
– Non persistent connection
– Persistent connection
Non Persistent Connection:
• In this strategy, one TCP connection is needed for each request and
response.
• It works as follows:
– Client opens TCP connection, sends request
– Server response and close connection
– Client reads until eof and close connection
• If there is need to access ‘n’ locations in same server then the connection
must be n+1 times need to be open and close and results in high overhead.
• N+1 buffers are needed during each connection open
Persistent Connections
• It is the default connection by HTTP
• Server response and leaves connection open for more request
• Server close by response from client or if time out has been reached
• Only single set of buffer is needed to be set for the connection at each side
• Documents are created dynamically (actively) in case of persistent
connections
Message Formats
• Each request and response message are made up of four sections
• First message in request message is called request line
• First message in response message is called status line
Request Message
• The method field defines the request types
• GET method to send a request
• The HEAD method is used when the client needs only some information
about the web page from the server
• The PUT method is the inverse of the GET method; it allows the client to post
a new web page on the server
• The POST method is similar to the PUT method, but it is used to send some
information to the server to be added to the web page or to modify the web
page
• The TRACE method is used for debugging; the client asks the server to echo
back the request to check whether the server is getting the requests
• The DELETE method allows the client to delete a web page on the server if
the client has permission to do so.
• The CONNECT method was originally made as a reserve method; it may be
used by proxy servers.
• The OPTIONS method allows the client to ask about the properties of a web
page
• After the request line, we can have zero or more request header lines
• Each header line sends additional information from the client to the server
Fig: Formats of the request and response messages
Table: Request header names
Response Message
• It consists of
– Status line
– Header line
– Blank line
– Body
• First line in a response message is called status line
• Status code defines status of code. It is of following types
– Range of 100 – informational
– Range of 200 – successful request
– Range of 300 – redirect to another URL
– Range of 400 – error at client site
– Range of 500 – error at server site
Header and its purpose:
• Date – Current date
• Upgrade – Preferred communication protocol
• Server – Information about server
• Location - client to send request to another site
• Accept range – server accept requested byte range
• All the other fields are similar to request message
Conditional Request:
• Inclusion of condition in the existing request by client
• Example: Client request server to display web page from certain date and time
Cookies:
• Web needs to store some information about the user choice or activity, this
plays the purpose of cookies
• Cookies are used in the following applications:
• Add to cart option on electronic stores
• Access to registered clients
• Web sites used as portals, where users selects the web pages he wants to see
• Web sites only as advertising agencies
Cookies Creation:
• Whenever server receives request from client, server retrieves client
information such as ID, Name, Visited page and so on
• Server adds these information along with the response sent to client
• When client receives response, browser stores cookie in the cookie directory,
which is stored by the server domain name
• When client sends request to the same server, using cookie information,
server identifies the client as an existing client and not the new one
• Cookie never disclose the information to the user nor read by the browser
Web Caching – Proxy Servers
• A proxy server is a computer that maintains the copies of response to recent
request
• If HTTP client sends request to proxy server, it checks for the requested
information in cache.
• If needed response is not in cache, proxy server sends request to the
corresponding server
• All incoming responses are stored in proxy server for future requests from
client
Proxy Server:
• Reduces work load of original server
• Decreased traffic
• Improves latency
• It can act as both server and client
• On receipt of request from client on which it has no response, it acts as client
and sends request to target server
• On receipt of response from target server, it acts as server and respond to
the client
Proxy server – location:
• A client computer can acts as proxy server, that holds response to request
invoked by client
• A proxy server can be installed on LAN to reduce traffic
• An ISP with many customers can add proxy server to reduce traffic
Cache Update:
• It maintains for some period of time and includes last modification time of
the information
HTTP Security:
• It returns over SSL (Secure Socket Layer) and provides confidentiality,
client/server authentication and data integrity
1 de 15

Recomendados

Unit III por
Unit IIIUnit III
Unit IIIAPARNA P
46 visualizações33 slides
Application layer por
Application layerApplication layer
Application layerAhmed_Hamed_Attia
334 visualizações24 slides
COMPUTER NETWORKS UNIT 5 por
COMPUTER NETWORKS UNIT 5COMPUTER NETWORKS UNIT 5
COMPUTER NETWORKS UNIT 5BON SECOURS COLLEGE FOR WOMEN
36 visualizações53 slides
internet protocol por
internet protocolinternet protocol
internet protocolrajshreemuthiah
831 visualizações16 slides
TCP/IP Protocols por
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP ProtocolsDanial Mirza
2.2K visualizações26 slides
Internet Protocols por
Internet ProtocolsInternet Protocols
Internet ProtocolsEILLEN IVY PORTUGUEZ
21.6K visualizações18 slides

Mais conteúdo relacionado

Mais procurados

Application layer protocols por
Application layer protocolsApplication layer protocols
Application layer protocolsN.Jagadish Kumar
733 visualizações98 slides
Internet protocols Report Slides por
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report SlidesBassam Kanber
2.2K visualizações35 slides
TCP- Transmission Control Protocol por
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol Akhil .B
9.3K visualizações20 slides
Application layer and protocols of application layer por
Application layer and protocols of application layerApplication layer and protocols of application layer
Application layer and protocols of application layerTahmina Shopna
108 visualizações27 slides
Web technology-guide por
Web technology-guideWeb technology-guide
Web technology-guideSrihari
102 visualizações14 slides
Unit 5 application layer por
Unit 5 application layerUnit 5 application layer
Unit 5 application layerKritika Purohit
196 visualizações21 slides

Mais procurados(20)

Application layer protocols por N.Jagadish Kumar
Application layer protocolsApplication layer protocols
Application layer protocols
N.Jagadish Kumar 733 visualizações
Internet protocols Report Slides por Bassam Kanber
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
Bassam Kanber2.2K visualizações
TCP- Transmission Control Protocol por Akhil .B
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol
Akhil .B9.3K visualizações
Application layer and protocols of application layer por Tahmina Shopna
Application layer and protocols of application layerApplication layer and protocols of application layer
Application layer and protocols of application layer
Tahmina Shopna108 visualizações
Web technology-guide por Srihari
Web technology-guideWeb technology-guide
Web technology-guide
Srihari102 visualizações
Unit 5 application layer por Kritika Purohit
Unit 5 application layerUnit 5 application layer
Unit 5 application layer
Kritika Purohit196 visualizações
Internet protocols por Santosh Kulkarni
Internet protocolsInternet protocols
Internet protocols
Santosh Kulkarni994 visualizações
Protocols and the TCP/IP Protocol Suite por Atharaw Deshmukh
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol Suite
Atharaw Deshmukh17.5K visualizações
Computer network coe351- part2- final por Taymoor Nazmy
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- final
Taymoor Nazmy40 visualizações
Http Introduction por Akshay Dhole
Http IntroductionHttp Introduction
Http Introduction
Akshay Dhole1.5K visualizações
TCP IP por hivasu
TCP IPTCP IP
TCP IP
hivasu1.5K visualizações
internet protocol por Afeef Musthafa
internet protocolinternet protocol
internet protocol
Afeef Musthafa714 visualizações
Internet layer security protocol & IPsec por Kirti Ahirrao
Internet layer security protocol & IPsecInternet layer security protocol & IPsec
Internet layer security protocol & IPsec
Kirti Ahirrao56 visualizações
application layer protocols por bhavanatmithun
application layer protocolsapplication layer protocols
application layer protocols
bhavanatmithun2.6K visualizações
Email HTTP And FTP por Shishpal Vishnoi
Email HTTP And FTP Email HTTP And FTP
Email HTTP And FTP
Shishpal Vishnoi680 visualizações
Web and http computer network por Anil Pokhrel
Web and http computer networkWeb and http computer network
Web and http computer network
Anil Pokhrel4K visualizações
Internet Protocol por guesta8dc1
Internet ProtocolInternet Protocol
Internet Protocol
guesta8dc1747 visualizações

Similar a Unit v

Web & HTTP por
Web & HTTPWeb & HTTP
Web & HTTPMansiSingh269494
18 visualizações12 slides
Module 5 Application and presentation Layer .pptx por
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxAASTHAJAJOO
19 visualizações156 slides
CNIT 129S - Ch 3: Web Application Technologies por
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesSam Bowne
963 visualizações88 slides
Ch 3: Web Application Technologies por
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application TechnologiesSam Bowne
160 visualizações88 slides
CNIT 129S: Ch 3: Web Application Technologies por
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesSam Bowne
1.2K visualizações83 slides
HyperText Transfer Protocol por
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocolponduse
2.3K visualizações28 slides

Similar a Unit v (20)

Module 5 Application and presentation Layer .pptx por AASTHAJAJOO
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptx
AASTHAJAJOO19 visualizações
CNIT 129S - Ch 3: Web Application Technologies por Sam Bowne
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application Technologies
Sam Bowne963 visualizações
Ch 3: Web Application Technologies por Sam Bowne
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application Technologies
Sam Bowne160 visualizações
CNIT 129S: Ch 3: Web Application Technologies por Sam Bowne
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne1.2K visualizações
HyperText Transfer Protocol por ponduse
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
ponduse2.3K visualizações
SCWCD : The web client model por Ben Abdallah Helmi
SCWCD : The web client modelSCWCD : The web client model
SCWCD : The web client model
Ben Abdallah Helmi259 visualizações
SCWCD : The web client model : CHAP : 1 por Ben Abdallah Helmi
SCWCD  : The web client model : CHAP : 1SCWCD  : The web client model : CHAP : 1
SCWCD : The web client model : CHAP : 1
Ben Abdallah Helmi673 visualizações
Clients and Servers.ppt por Mohammed Ilyas
Clients and Servers.pptClients and Servers.ppt
Clients and Servers.ppt
Mohammed Ilyas7 visualizações
Browser por Shweta Oza
BrowserBrowser
Browser
Shweta Oza179 visualizações
Ch-1_.ppt por berihunmolla2
Ch-1_.pptCh-1_.ppt
Ch-1_.ppt
berihunmolla215 visualizações
1-1.pdf por ssusera99a83
1-1.pdf1-1.pdf
1-1.pdf
ssusera99a834 visualizações
Hypertexttransferprotocolhttp 131012171813-phpapp02 por Nidhitransport
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
Nidhitransport72 visualizações
BITM3730 11-1.pptx por MattMarino13
BITM3730 11-1.pptxBITM3730 11-1.pptx
BITM3730 11-1.pptx
MattMarino137 visualizações
HyperText Transfer Protocol (HTTP) por Gurjot Singh
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
Gurjot Singh82.5K visualizações
BITM3730 Networking.pdf por MattMarino13
BITM3730 Networking.pdfBITM3730 Networking.pdf
BITM3730 Networking.pdf
MattMarino1311 visualizações
Compute rNetwork.pptx por ShehryarFreelancer
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
ShehryarFreelancer15 visualizações
Advanced Web Design And Development BIT 3207 por Lori Head
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207
Lori Head2 visualizações
Rest WebAPI with OData por Mahek Merchant
Rest WebAPI with ODataRest WebAPI with OData
Rest WebAPI with OData
Mahek Merchant453 visualizações
Rest APIs Training por Shekhar Kumar
Rest APIs TrainingRest APIs Training
Rest APIs Training
Shekhar Kumar90 visualizações

Último

BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB... por
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
73 visualizações113 slides
7 NOVEL DRUG DELIVERY SYSTEM.pptx por
7 NOVEL DRUG DELIVERY SYSTEM.pptx7 NOVEL DRUG DELIVERY SYSTEM.pptx
7 NOVEL DRUG DELIVERY SYSTEM.pptxSachin Nitave
61 visualizações35 slides
Solar System and Galaxies.pptx por
Solar System and Galaxies.pptxSolar System and Galaxies.pptx
Solar System and Galaxies.pptxDrHafizKosar
94 visualizações26 slides
Psychology KS5 por
Psychology KS5Psychology KS5
Psychology KS5WestHatch
103 visualizações5 slides
The basics - information, data, technology and systems.pdf por
The basics - information, data, technology and systems.pdfThe basics - information, data, technology and systems.pdf
The basics - information, data, technology and systems.pdfJonathanCovena1
126 visualizações1 slide
GSoC 2024 por
GSoC 2024GSoC 2024
GSoC 2024DeveloperStudentClub10
81 visualizações15 slides

Último(20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB... por Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
Nguyen Thanh Tu Collection73 visualizações
7 NOVEL DRUG DELIVERY SYSTEM.pptx por Sachin Nitave
7 NOVEL DRUG DELIVERY SYSTEM.pptx7 NOVEL DRUG DELIVERY SYSTEM.pptx
7 NOVEL DRUG DELIVERY SYSTEM.pptx
Sachin Nitave61 visualizações
Solar System and Galaxies.pptx por DrHafizKosar
Solar System and Galaxies.pptxSolar System and Galaxies.pptx
Solar System and Galaxies.pptx
DrHafizKosar94 visualizações
Psychology KS5 por WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch103 visualizações
The basics - information, data, technology and systems.pdf por JonathanCovena1
The basics - information, data, technology and systems.pdfThe basics - information, data, technology and systems.pdf
The basics - information, data, technology and systems.pdf
JonathanCovena1126 visualizações
Classification of crude drugs.pptx por GayatriPatra14
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra1492 visualizações
AI Tools for Business and Startups por Svetlin Nakov
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov111 visualizações
When Sex Gets Complicated: Porn, Affairs, & Cybersex por Marlene Maheu
When Sex Gets Complicated: Porn, Affairs, & CybersexWhen Sex Gets Complicated: Porn, Affairs, & Cybersex
When Sex Gets Complicated: Porn, Affairs, & Cybersex
Marlene Maheu73 visualizações
How to empty an One2many field in Odoo por Celine George
How to empty an One2many field in OdooHow to empty an One2many field in Odoo
How to empty an One2many field in Odoo
Celine George72 visualizações
Google solution challenge..pptx por ChitreshGyanani1
Google solution challenge..pptxGoogle solution challenge..pptx
Google solution challenge..pptx
ChitreshGyanani1135 visualizações
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptx por Debapriya Chakraborty
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptxGopal Chakraborty Memorial Quiz 2.0 Prelims.pptx
Gopal Chakraborty Memorial Quiz 2.0 Prelims.pptx
Debapriya Chakraborty684 visualizações
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively por PECB
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks EffectivelyISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
PECB 598 visualizações
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf por SukhwinderSingh895865
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
SukhwinderSingh895865536 visualizações
Education and Diversity.pptx por DrHafizKosar
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar177 visualizações
Narration lesson plan por TARIQ KHAN
Narration lesson planNarration lesson plan
Narration lesson plan
TARIQ KHAN59 visualizações
Psychology KS4 por WestHatch
Psychology KS4Psychology KS4
Psychology KS4
WestHatch90 visualizações
11.28.23 Social Capital and Social Exclusion.pptx por mary850239
11.28.23 Social Capital and Social Exclusion.pptx11.28.23 Social Capital and Social Exclusion.pptx
11.28.23 Social Capital and Social Exclusion.pptx
mary850239304 visualizações
ICS3211_lecture 08_2023.pdf por Vanessa Camilleri
ICS3211_lecture 08_2023.pdfICS3211_lecture 08_2023.pdf
ICS3211_lecture 08_2023.pdf
Vanessa Camilleri187 visualizações

Unit v

  • 1. VELAMMAL ENGINEERING COLLEGE An Autonomous Institution, Affiliated to Anna University Chennai, & Approved by AICTE Delhi CS8591 COMPUTER NETWORKS UNIT V APPLICATION LAYER Part I – WWW and HTTP
  • 2. 5.1. World Wide Web • Web is the repository of documents called web pages • World Wide Web can be defined in two terms as distributed and linked • Distributed refers to the extension of the web whereas linking refers to retrieving of one web page from other • Linking of web page is achieved by a concept called hypertext • Hypertext – Linked text documents 5.1.2 Architecture of WWW • WWW is a distributed client server service. • Client access server through browser • Server provided over different web pages called sites • Web pages can be simple or composite • Composite web page have links to other web pages. • Simple web page have no link to other web pages
  • 3. Web Client (Browser) • Web Client access resources through web browser • Web browser consists of 3 parts: – Controller – Client protocol – Interpreters • Controller receives input from input device • Using interpreter, browser displays the document on to the screen • Based upon application, it uses the appropriate protocol Fig: Composite Link Fig: Browser
  • 4. Web Server • Collection of web pages stored in a server is called web server. • Each time a request arrives, the corresponding document is sent to the client. • To improve efficiency, servers normally store requested files in a cache in memory; memory is faster to access than a disk. • A server can also become more efficient through multithreading or multiprocessing. • In this case, a server can answer more than one request at a time. • Some popular web servers include Apache and Microsoft Internet Information Server. 5.1.3 Uniform Resource Locator (URL) • A web page, as a file, needs to have a unique identifier to distinguish it from other web pages. • To define a web page, we need three identifiers: host, port, and path • In addition to this we also need to specify the protocol
  • 5. Example: • Protocol://host/path (Normal) • Protocol: //host: port/path (for specific application) • www:// www.mhh.com/compsci Protocol: • It is the abbreviation of client server program that need to access web page • Example: HTTP Host: • It is the IP address of the server or domain name Port: • It is a 16-bit integer predefined Path: • It identifies location and name of the file in the underlying operating system Web Documents • www documents are classified into three categories: – Static – Dynamic – Active
  • 6. Static Documents: • Fixed size documents created and stored in server • Client can access only copy of the documents. • User has no right to change content over the document • It can be modified by the privileged users • Example: Document viewed through browser • Static documents are HTML, XML, XSL, and XHTML for its creation Dynamic Documents: • Created by the web server on behalf of the request from user • Web server runs on application program and creates the document • Example: Date and time retrieval from server (Date and time are dynamic information) • Dynamic documents are JSP, ASP, Cold fusion with SQL Active Documents: • Programs that run on client site are called active documents • Example: Run a program that interacts with the user (Graphics) • Active documents use Java Applets
  • 7. 5.2 Hyper Text Transfer Protocol (HTTP) • It is the protocol used to retrieve specific web page from the web • HTTP client sends request, HTTP server returns a response • Well-known port number of HTTP at server side is 80 • Since HTTP use TCP, it is connection oriented and reliable protocol • The requested web pages can be located at different server. • So different methods must be employed to retrieve each object using TCP connection • There are two types of connections involved in this operation: – Non persistent connection – Persistent connection Non Persistent Connection: • In this strategy, one TCP connection is needed for each request and response. • It works as follows: – Client opens TCP connection, sends request – Server response and close connection – Client reads until eof and close connection
  • 8. • If there is need to access ‘n’ locations in same server then the connection must be n+1 times need to be open and close and results in high overhead. • N+1 buffers are needed during each connection open Persistent Connections • It is the default connection by HTTP • Server response and leaves connection open for more request • Server close by response from client or if time out has been reached • Only single set of buffer is needed to be set for the connection at each side • Documents are created dynamically (actively) in case of persistent connections Message Formats • Each request and response message are made up of four sections • First message in request message is called request line • First message in response message is called status line Request Message • The method field defines the request types • GET method to send a request
  • 9. • The HEAD method is used when the client needs only some information about the web page from the server • The PUT method is the inverse of the GET method; it allows the client to post a new web page on the server • The POST method is similar to the PUT method, but it is used to send some information to the server to be added to the web page or to modify the web page • The TRACE method is used for debugging; the client asks the server to echo back the request to check whether the server is getting the requests • The DELETE method allows the client to delete a web page on the server if the client has permission to do so. • The CONNECT method was originally made as a reserve method; it may be used by proxy servers. • The OPTIONS method allows the client to ask about the properties of a web page • After the request line, we can have zero or more request header lines • Each header line sends additional information from the client to the server
  • 10. Fig: Formats of the request and response messages
  • 12. Response Message • It consists of – Status line – Header line – Blank line – Body • First line in a response message is called status line • Status code defines status of code. It is of following types – Range of 100 – informational – Range of 200 – successful request – Range of 300 – redirect to another URL – Range of 400 – error at client site – Range of 500 – error at server site Header and its purpose: • Date – Current date • Upgrade – Preferred communication protocol • Server – Information about server • Location - client to send request to another site
  • 13. • Accept range – server accept requested byte range • All the other fields are similar to request message Conditional Request: • Inclusion of condition in the existing request by client • Example: Client request server to display web page from certain date and time Cookies: • Web needs to store some information about the user choice or activity, this plays the purpose of cookies • Cookies are used in the following applications: • Add to cart option on electronic stores • Access to registered clients • Web sites used as portals, where users selects the web pages he wants to see • Web sites only as advertising agencies Cookies Creation: • Whenever server receives request from client, server retrieves client information such as ID, Name, Visited page and so on • Server adds these information along with the response sent to client • When client receives response, browser stores cookie in the cookie directory, which is stored by the server domain name
  • 14. • When client sends request to the same server, using cookie information, server identifies the client as an existing client and not the new one • Cookie never disclose the information to the user nor read by the browser Web Caching – Proxy Servers • A proxy server is a computer that maintains the copies of response to recent request • If HTTP client sends request to proxy server, it checks for the requested information in cache. • If needed response is not in cache, proxy server sends request to the corresponding server • All incoming responses are stored in proxy server for future requests from client Proxy Server: • Reduces work load of original server • Decreased traffic • Improves latency • It can act as both server and client • On receipt of request from client on which it has no response, it acts as client and sends request to target server
  • 15. • On receipt of response from target server, it acts as server and respond to the client Proxy server – location: • A client computer can acts as proxy server, that holds response to request invoked by client • A proxy server can be installed on LAN to reduce traffic • An ISP with many customers can add proxy server to reduce traffic Cache Update: • It maintains for some period of time and includes last modification time of the information HTTP Security: • It returns over SSL (Secure Socket Layer) and provides confidentiality, client/server authentication and data integrity