Top Banner
Networked Applications Chapter 11 Copyright 2001 Prentice Hall
23

Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Dec 24, 2015

Download

Documents

Vivien Garrison
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Networked Applications

Chapter 11

Copyright 2001 Prentice Hall

Page 2: 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

Page 3: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 4: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Web-Enabled Database Access

Page 5: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 6: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Web-Enabled Database Access

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

User with Browser Database ServerApplication Server

Page 7: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 8: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 9: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 10: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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)

Page 11: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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)

Page 12: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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)

Page 13: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 14: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 15: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Web-Enabled Database Access

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

User with Browser Database Server

WebpageWebpage

Application Server

Page 16: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 17: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 18: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 19: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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)

Page 20: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 21: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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

Page 22: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

Web-Enabled Database Access

CGI API

Speed Slower Faster

Generality General Proprietary

Page 23: Networked Applications Chapter 11 Copyright 2001 Prentice Hall.

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