23
Networked Applications Chapter 11 Copyright 2001 Prentice Hall

Networked Applications Chapter 11 Copyright 2001 Prentice Hall

Embed Size (px)

Citation preview

Networked Applications

Chapter 11

Copyright 2001 Prentice Hall

The Primacy of Applications

• Users only care about applications

• The other layers (transport, internet, data link, physical) exist only to support applications

Applications in this Chapter

• There are many applications• We will only look at 3 networked

applications– Web-enabled database access

– Internet E-mail

– IP telephony for voice-data convergence

• Each is important• Each has general lessons to teach

Web-Enabled Database Access

Web-Enabled Database Access• Problem: Database is on a “database

server”

– Mainframe or client/server server

– These need proprietary client software or a terminal

• Problem: Most users only have browsers

User with Browser Database Server

Web-Enabled Database Access

• Solution: an application server (webserver with intermediary software) mediates between the two

User with Browser Database ServerApplication Server

Web-Enabled Database Access

• Step 1: User types URL of data entry form

• Step 2: Webserver application sends form

User with Browser Database Server

URL

Form

Application Server

Web-Enabled Database Access

• Step 3: User types information in form, hits Send– Browser puts data in a request line

– GET keyword

– /cgi-bin is the absolute path to a directory holding an intermediary program, bogo.exe

GET /cgi-bin/bogo.exe?last=Lee&first=Pat

Web-Enabled Database Access

• Step 3: User types information in form, hits Send– Data separated from absolute path by ?

– last field contains the value Lee

– first field contains the value Pat

GET /cgi-bin/bogo.exe?last=Lee&first=Pat

Web-Enabled Database Access

• Step 3: Application server webserver software passes data form to the intermediary program, Bogo.exe, on the webserver

Application Server

WebserverApplicationSoftware

IntermediaryProgram

(Bogo.exe)

Web-Enabled Database Access• Step 4: Bogo.exe puts the data into a

query in the database server’s standard format

– Sends the query to the server

User with Browser Database Server

StandardQuery

Application Server

(Bogo.exe)

Web-Enabled Database Access

• Step 5: Database server sends response in its standard format to the intermediary program, Bogo.exe

User with Browser Database Server

StandardResponse

Application Server

(Bogo.exe)

Web-Enabled Database Access

• Step 6: Application server intermediary software (Bogo.exe) creates a new HTML webpage containing the response

Application Server

IntermediaryProgram

(Bogo.exe)

WebpageWebpage

Web-Enabled Database Access

• Step 7: Application server intermediary software passes this webpage to the webserver application program

Application Server

WebserverApplicationSoftware

IntermediaryProgram

(Bogo.exe)

WebpageWebpage

Web-Enabled Database Access

• Step 8: Webserver application program passes the webpage to the browser

User with Browser Database Server

WebpageWebpage

Application Server

Transparency

• Browser does not know that it is dealing with a database server; it sends standard webserver commands, gets webpages back

• Database server does not know it is dealing with a browser; receives standard database server requests, sends standard database server responses

• No changes are needed in the browser or database application software; process is transparent to both the browser and the database server

Web-Enabled Database Access

• CGI and Intermediary Program

– Intermediary program (Bogo.exe) does the actual translation work

WebserverApplication

Program

WebserverApplication

Program

IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

DatabaseApplication

Program

DatabaseApplication

Program

Web-Enabled Database Access

• CGI and Other Programs– Webserver application programs have a

standardized way of moving data to and from other programs

• Common Gateway Interface (CGI) standard

WebserverApplication

Program

WebserverApplication

Program

IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

DatabaseApplication

Program

DatabaseApplication

Program

CGI

Web-Enabled Database Access

• CGI– Starts a new copy of the intermediary program

every time the intermediary program is called

– This is very slow

– OK only for small applications

WebserverApplication

Program

WebserverApplication

Program

IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

DatabaseApplication

Program

DatabaseApplication

Program

CGI IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

IntermediaryProgram

(Bogo.exe)

Web-Enabled Database Access

• Application Program Interfaces (APIs)– Database servers have proprietary ways of

communication with other application programs

– Other application program sends an application program interface (API) call to the database program

WebserverApplication

Program

WebserverApplication

Program

DatabaseApplication

Program

DatabaseApplication

Program

API

Web-Enabled Database Access

• Application Program Interfaces (APIs)

– Faster than CGI but proprietary

– Webserver applications do not support all database APIs

WebserverApplication

Program

WebserverApplication

Program

DatabaseApplication

Program

DatabaseApplication

Program

API

Web-Enabled Database Access

CGI API

Speed Slower Faster

Generality General Proprietary

Web-Enabled Database Access

• Client-Side Processing

– Webserver can download webpage with Java or Active-X program

– Client can then communicate directly with the database server

User with Browser Database Server

Webpage withJava applet

Subsequent Interactions