48
Copyright 2005 John Wiley & Sons, Inc 2 - 1 Business Data Communications and Networking 8th Edition Jerry Fitzgerald and Alan Dennis John Wiley & Sons, Inc

Application layer

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Application layer

Copyright 2005 John Wiley & Sons, Inc2 - 1

Business Data Communications and Networking

8th Edition

Jerry Fitzgerald and Alan Dennis

John Wiley & Sons, Inc

Page 2: Application layer

Application Layer

Copyright 2005 John Wiley & Sons, Inc2 - 2

Chapter 2

Page 3: Application layer

Outline

Copyright 2005 John Wiley & Sons, Inc2 - 3

Application Architectures Host-Based, Client-Based, and Client-Server

Architectures, Choosing ArchitecturesWorld Wide Web

How the Web Works, Inside an HTTP Request & HTTP Response

Electronic Mail How E-Mail Works, Inside an SMTP PacketListserv, Attachments in MIME

Other ApplicationsFtp, Telnet, Instant Messaging, Videoconferencing

Page 4: Application layer

Application Layer - Introduction

Copyright 2005 John Wiley & Sons, Inc2 - 4

Application Layer

Network Layer

Transport Layer

Applications(e.g., email, web, word processing)

• Functions of Applications– Data storage

– Storing of data generated by programs (e.g., files, records)

– Data access logic– Processing required to access stored data (e.g., SQL)

– Application logic – Business logic

– Presentation logic– Presentation of info to user and acceptance of user commands

Page 5: Application layer

Application Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 5

Determined by how functions of application programs are spread among clients and servers Host-based Architectures

Server performs almost all functions Client-based architectures

Client performs most functions Client-server architectures

Functions shared between client and server

Page 6: Application layer

Host-Based Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 6

–captures key strokes then sends them to the mainframe

–displays information according to the server’s instructions

or a PC running a terminal emulation program

Page 7: Application layer

Problems with Host-based Arch.

Copyright 2005 John Wiley & Sons, Inc2 - 7

Host becoming a bottleneckAll processing done by the host, which can

severely limit network performanceUpgrades typically expensive and “lumpy”

Available upgrades require big jumps in processing and memory $$$

Network demand grows more incrementally, so this often means a poor fit (too much or too little) between host performance and network demand.

Page 8: Application layer

Client-Based Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 8

Was popular in 1980s with the widespread use of PCs, LANs, and programs such as spreadsheets and word processors

Example: Using a word processing on a PC and storing data (file) on a server

Page 9: Application layer

Problems with Client-Based Arch.

Copyright 2005 John Wiley & Sons, Inc2 - 9

Data MUST travel back and forth between server and clientExample: when the client program is making

a database query, the ENTIRE database must travel to the client before the query can be processed

Result in poor network performance

Page 10: Application layer

Client-Server Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 10

Client(PC)

Server

(PC, mini, mainframe)

Presentation logicApplication logic

Data Access logicData Storage

Application logic

may reside on the client, server or be split up between the two

Used by most networks today

Example: Using a Web browser to get pages from

Page 11: Application layer

Client-Server Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 11

AdvantagesMore efficient because of distributed

processingAllow hardware and software from different

vendors to be used togetherDisadvantages

Difficulty in getting software from different vendors to work together smoothly

May require Middleware, a third category of software

Page 12: Application layer

Middleware

Copyright 2005 John Wiley & Sons, Inc2 - 12

Examples:Distributed Computing Environment (DCE)Common Object Request Broker Architecture (CORBA)Open Database Connectivity (ODBC)

Middleware

client application programs

server application programs

a standard way of

translating between software

from different vendors

–Manages message transfers

– Insulates network changes from the clients ((e.g., adding a new server)

Page 13: Application layer

Multi-tier Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 13

Involve more than two computers in distributing application program logic 2-tier architecture (architectures discussed

so far)3-tier architecture

3 sets of computers involvedN-tier architecture

more than three sets of computers used

Page 14: Application layer

3-tier Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 14

Page 15: Application layer

N-tier Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 15

Page 16: Application layer

Multi-tier Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 16

AdvantagesBetter load balancing:

More evenly distributed processing. (e.g., application logic distributed between several servers.)

More scalable:Only servers experiencing high demand need be

upgradedDisadvantages

Heavily loaded network: More distributed processing more exchanges

Difficult to program and test due to increased complexity

Page 17: Application layer

Fat vs. Thin Clients

Copyright 2005 John Wiley & Sons, Inc2 - 17

Depends on how much of the application logic resides on the clientFat client: (a.k.a., thick client)

All or most of the application logicThin client:

Little or no application logicBecoming popular because easier to manage, (only

the server application logic generally needs to be updated)

The best example: World Wide Web architecture (uses a two-tier, thin client architecture)

Page 18: Application layer

Thin-Client Example: Web Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 18

Client(PC)

Web Server

(PC, mini, mainframe)

Presentation logic Application LogicData Access logic

Data Storage

Page 19: Application layer

Criteria for Choosing Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 19

Infrastructure CostCost of servers, clients, and circuitsMainframes: very expensive; terminals, PCs: very

inexpensiveDevelopment Cost

Mainly cost of software developmentSoftware: expensive to develop; off-the-shelf software:

inexpensiveScalability

Ability to increase (or decrease) in computing capacity as network demand changes

Mainframes: not scalable; PCs: highly scalable

Page 20: Application layer

Choosing an Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 20

 

Host-Based Client-Based Client-Server

Cost of Infrastructure High Medium Low

Cost of Development Low Medium High

Scalability Low Medium High

Page 21: Application layer

Applications

Copyright 2005 John Wiley & Sons, Inc2 - 21

World Wide WebE-mailFile Transfer VideoconferencingInstant Messaging

Page 22: Application layer

World Wide Web

Copyright 2005 John Wiley & Sons, Inc2 - 22

Two central ideas:Hypertext

A document containing links to other documentsUniform Resource Locators (URLs)

A formal way of identifying links to other documentsInvention of WWW (1989)

By Tim Berners-Lee at CERN in Switzerland First graphical browser, Mosaic, (1993)

By Marc Andressen at NCSA in USA; later founded Netscape

CERN - Centre Européan pour Rechèrche NucleaireNCSA - National Center for Supercomputing Applications

Page 23: Application layer

How the Web Works

Copyright 2005 John Wiley & Sons, Inc2 - 23

HTTP Response

HTTP Request

Client Computer

Server Computer HTTP - Hypertext Transfer Protocol

Main Web communications protocol:

Clicking on a hyperlink or typing a URL into a browser starts a request-response cycle

A request-response cycle: include multiple steps since web pages often contain embedded files, such as graphics, each requiring a separate response.

Page 24: Application layer

HTTP Request Message

Copyright 2005 John Wiley & Sons, Inc2 - 24

Request line(command, URL, HTTP version number)

Request header(information on the browser, date, and the referring page )

Request body(information sent to the server,

e.g., from a form)

required

optional

optional

(If the user types in the

URL by themselves,

then the referring page

is blank.)

Page 25: Application layer

Example of an HTTP Request

Copyright 2005 John Wiley & Sons, Inc2 - 25

GET http://www.kelley.indiana.edu/ardennis/home.htm HTTP/1.1

Date: Mon 06 Aug 2001 17:35:46 GMT

User-Agent: Mozilla/6.0

Referer: http://www.indiana.edu/~aisdept/faculty.htm

Request Header

Request Line

Web browser (code name for Netscape)

Command URL HTTP version

URL that contained the link to the requested URL

Note that this HTTP Request message has no “Body” part.

GMT – Greenwich Mean Time

Page 26: Application layer

HTTP Response Message

Copyright 2005 John Wiley & Sons, Inc2 - 26

Response status(http version number, status code, reason)

Response header(information on the server, date,

URL of the page retrieved, format used )

Response body(requested web page)

optional

optional

required

Page 27: Application layer

Example of an HTTP Response

Copyright 2005 John Wiley & Sons, Inc2 - 27

<html><head><title>Allen R. Dennis</title></head><body><H2> Allen R. Dennis </H2><P>Welcome to the home page of Allen R. Dennis</P>

</body></html>

Date: Mon 06 Aug 2001 17:35:46 GMT Server: NCSA/1.3 Location: http:// www.kelley.indiana.edu/adennis/home.htm Content-type: text/html

Response Header

Response Body

HTTP/1.1 200 OK Response Status

Another example of response status: HTTP/1.1 404 page not found)

Page 28: Application layer

HTML - Hypertext Markup Language

Copyright 2005 John Wiley & Sons, Inc2 - 28

A protocol used to format Web pages Also developed at CERN (initially for text

files)TAGs embedded in HTML documents

include information on how to format the fileExtensions to HTML needed to format

multimedia filesXML - Extensible Markup Language

A new markup language becoming popular

Page 29: Application layer

Electronic Mail

Copyright 2005 John Wiley & Sons, Inc2 - 29

Heavily used Internet applicationMuch, much faster than snail mail (regular

mail)Extremely inexpensive (compared to $3-$10

per paper mail cost)Includes preparation, paper, postage, etc,

Can substitute for other forms of communication, such as telephone calls Eliminates “telephone tag”

E-mail users can answer at his/her convenience, instead of time of call

Page 30: Application layer

E-mail Standards

Copyright 2005 John Wiley & Sons, Inc2 - 30

SMTP - Simple Mail Transfer ProtocolMain e-mail standard for

Originating user agent and the mail transfer agent Between mail transfer agents

Originally written to handle only text filesUsually used in two-tier client-server architectures

Post Office Protocol (POP) and Internet Mail Access Protocol (IMAP)Main protocols used between the receiver user agent

and mail transfer agentMain difference: with IMAP, messages can be left at

the server after downloading them to the clientOther competing standards

Common Messaging Calls (CMC), X.400

Page 31: Application layer

Two-Tier E-mail Architecture

Copyright 2005 John Wiley & Sons, Inc2 - 31

User agents (also called e-mail clients)Run on client computers Send e-mail to e-mail serversDownload e-mail from mailboxes on those serversExamples: Eudora, Outlook, Netscape Messenger

Mail transfer agents (also called mail server)Used by e-mail serversSend e-mail between e-mail serversMaintain individual mailboxes.

Page 32: Application layer

How SMTP Works

Copyright 2005 John Wiley & Sons, Inc2 - 32

LAN

Internet

LAN

with e-mail client software

Client computer

Server computer with

Server computer with

e-mail server software

e-mail server software

SMTP packet

SMTP packet

SMTP packet

SMTP packet

IMAP or POP packet

(“message transfer agent”)

an e-mail message is sent as an SMTP packet to the local mail server

reads the packet’s destination address and sends it over the Internet to the receiver’s mail server.

stores the message in the receiver’s mail box

contacts the mail server which then downloads

the message

(“user agent”)

Client computer

Page 33: Application layer

Host Based e-mail Architectures

Copyright 2005 John Wiley & Sons, Inc2 - 33

An old method used on UNIX based hostsSimilar to client-server architecture, except

Client PC replaced by a terminal (or emulator)Sends all keystrokes to the serverDisplay characters received from the server

All software reside on serverTakes client keystrokes and understand user’s

commandsCreates SMTP packets and sends them to next mail

server

Page 34: Application layer

Three-Tier Client-Server Arch.

Copyright 2005 John Wiley & Sons, Inc2 - 34

Client computer with Web Browser

Server computer with Web server software

Server computer with email server software

performs the same functions as the mail server in the two-tier example

sends HTTP requests to the Web server

•sends HTTP responses to the Web client

• translates the client’s HTTP requests into SMTP packets then send them to the Mail server

Best known example: Web based email (e.g., Hotmail)

No need for an email user agent

Page 35: Application layer

Web-based e-mail

Copyright 2005 John Wiley & Sons, Inc2 - 35

LAN

LAN

SMTP packet

SMTP packet

SMTP packet

Internet

Client computer with

Client computer with

Server computer with

Server computer with

Server computer with

Web server software

Web server software

Server computer with email server

software

e-mail server software

IMAP orPOP packet

IMAP packet

HTTP request

HTTP request

HTTP response

HTTP response

Web browser

Web browser

Page 36: Application layer

SMTP Message

Copyright 2005 John Wiley & Sons, Inc2 - 36

Header(source and destination addresses, date, subject, and other information about the e-mail message)

Body(message itself)

Attachments(additional files included

along with the e-mail message)

Page 37: Application layer

Sample SMTP Message

Copyright 2005 John Wiley & Sons, Inc2 - 37

From: “Alan Dennis;”<[email protected]>TO: “Pat Someone” <[email protected]>Date: Mon 06 Aug 2001 19:03:02 GMTSubject: Sample Note

Message-Id: <[email protected]>

DATA: This is an example of an e-mail message

Header

Body

Note that this SMTP message has no attachments.

Unique ID used to keep track of messages.

Text in “ “ are ignored

Page 38: Application layer

MIME

Copyright 2005 John Wiley & Sons, Inc2 - 38

Multipurpose Internet Mail ExtensionA graphics capable mail transfer agent protocol (to

send graphical information in addition to text) SMPT designed for text transfer only

Included as part of an e-mail clientTranslates graphical information into text allowing the

graphic to be sent as part of an SMTP message (as a special attachment)

Receiver’s e-mail client then translates the MIME attachment from text back into graphical format

Other Graphics capable mail agent protocols uuencode and binhex

Page 39: Application layer

Listserv Discussion Groups

Copyright 2005 John Wiley & Sons, Inc2 - 39

Mailing lists of users who join to discuss some special topic (e.g., cooking, typing, networking)

Some permit any member to post messages, some are more restricted

Parts of listservListserv Processor

Process commands ( subscriptions, etc,)Listserv Mailer

Receive a message and resend it to everyone To subscribe

Send an email to Listserv processor (address of the processor is different than the address of mailer)

Page 40: Application layer

File Transfer Protocol (FTP)

Copyright 2005 John Wiley & Sons, Inc2 - 40

Enables sending and receiving files over the Internet

Requires an application program on the client computer and a FTP server program on a server

Commonly used today for uploading web pagesMany packages available using FTP

WS-FTP (a graphical FTP software)FTP sites

Closed sitesRequires account name and password

Anonymous sitesAccount name: anonymous; pwd: your email address

Page 41: Application layer

Telnet

Copyright 2005 John Wiley & Sons, Inc2 - 41

Allows one computer to log into other computersRemote login enabling full control of the host

Requires an application program on the client computer and a Telnet server program on a serverClient program emulates a “dumb” terminal

Many packages available conforming TelnetEWAN

Requires account name and passwordAnonymous sites

Account name: anonymous; pwd: your email address

Page 42: Application layer

Instant Messaging (IM)

Copyright 2005 John Wiley & Sons, Inc2 - 42

A client-server program that allows real-time typed messages to be exchangedClient needs an IM client softwareServer needs an IM server package

Some types allow voice and video packets to be sentLike a telephone

Examples include AOL and ICQTwo step process:

Telling IM server that you are onlineChatting

Page 43: Application layer

How Instant Messaging Works

Copyright 2005 John Wiley & Sons, Inc2 - 43

LAN

LAN

LAN

IM packet

IM packet

IM packet

IM packet

Internet

Server computer with

IM client software

e-mail client software

Client computer with

Client computer with

with IM server software

sends a request to the IM server telling it that you are online. If a friend connects, the IM server sends a packet to your IM client and vice versa

If a chat session has more than two clients, multiple packets are sent by the IM server. IM servers can also relay information to other IM servers.

When you type some text, your IM client sends the text in a packet to the IM server which relays it to your friend.

Page 44: Application layer

Videoconferencing

Copyright 2005 John Wiley & Sons, Inc2 - 44

Provides real time transmission of video and audio signals among two or more locationsAllows people to meet at the same time in different

locationsSaving money and time by not having to move people

around (conference calling does the same thing)Typically involves 2 special purpose rooms with

cameras and displaysDesktop videoconferencing

Low cost application linking small video cameras and microphones together over the Internet

No need for special roomsExample: Net Meeting sw on clients communicating

through a videoconference server

Page 45: Application layer

Videoconferencing Standards

Copyright 2005 John Wiley & Sons, Inc2 - 45

Proprietary early systems Common standards in use today

H.320Designed for room-to-room videoconferencing over

high-speed phone linesH.323

Family of standards designed for desktop videoconferencing and just simple audio conferencing over Internet

MPEG-2Designed for faster connections such as LAN or

privately owned WANs

Page 46: Application layer

Webcasting

Copyright 2005 John Wiley & Sons, Inc2 - 46

Special type of one-directional videoconferencingContent is sent from the server to users

ProcessContent created by developer Downloaded as needed by the user Played by a plug-in to a Web browser

No standards for webcasting yetDefacto standards: products by RealNetworks

Page 47: Application layer

Implications for Management

Copyright 2005 John Wiley & Sons, Inc2 - 47

Network must be used to provide a worry-free environment for applications Network should not change the way an organization

operates; application should!Network should enable wide variety of applications

Dramatic increase in number and type of applicationsRapid growth in amount and type of traffic

Different implication on network design and management

Increased operating cost

Page 48: Application layer

Copyright 2005 John Wiley & Sons, Inc.

Copyright 2005 John Wiley & Sons, Inc2 - 48

All rights reserved. Reproduction or translation of this work beyond that permitted in section 117 of the 1976 United States Copyright Act without express permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for distribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages caused by the use of these programs or from the use of the information herein.