BUSINESS DATA
COMMUNICATIONS &
NETWORKING
Chapter 2
Application Layer
FitzGerald ● Dennis ● Durcikova
Prepared by Taylor M. Wells: College of Business Administration, California State University, Sacramento
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
CHAPTER 2: APPLICATION LAYER
2.1 INTRODUCTION 40
2.2 APPLICATION ARCHITECTURES 40
2.2.1 Host-Based Architectures 41
2.2.2 Client-Based Architectures 42
2.2.3 Client-Server Architectures 43
2.2.4 Peer-to-Peer Architectures 46
2.2.5 Choosing Architectures 47
2.3 WORLD WIDE WEB 49
2.3.1 How the Web Works 49
2.3.2 Inside an HTTP Request 50
2.3.3 Inside an HTTP Response 51
2.4 ELECTRONIC MAIL 53
2.4.1 How Email Works 54
2.4.2 Inside an SMTP Packet 57
2.4.3 Attachments in Multipurpose Internet
Mail Extension 58
2.5 OTHER APPLICATIONS 58
2.5.1 Telnet 59
2.5.2 Instant Messaging 60
2.5.3 Videoconferencing 61
2.6 IMPLICATIONS FOR
MANAGEMENT 63
SUMMARY 64
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Application Layer (Layer 7 of OSI Model, Layer 5 of Internet Model):
The application layer is the application software used by the network user
and includes much of what the OSI model contains in the application,
presentation, and session layers. It is the user’s access to the network.
By using the application software, the user defines what messages are sent over the network.
Because,it is the layer that most people understand best and because starting at the top
sometimes helps people understand better.
It discusses the architecture of network applications and several types of network
application software and the types of messages they generate.
• Application Architectures
• The Web (WWW)
• Email
• Other Application-Layer Protocols
• Implications for Management
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Application Layer
Internet Model
• Layer 5 in the Internet model
• The software that enables
Application
users to interact with the
network and accomplish tasks Transport
Network
Data Link
Physical
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Application Architecture
• The way the functions of the application layer are spread
out across the client and server
• Four components of applications:
1. Presentation logic
2. Application logic
3. Data access logic
4. Data Storage
In different application architectures, these components
are in different locations (client or server-host)
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Host-Based Architecture
• Server contains all components (“server-based”)
• Common in the 1960s with mainframes and terminals
Processing, Data
CLIENT/Terminal SERVER/Host
Presentation Logic
Application Logic
Data Access Logic
Data Storage
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Host-Based Architecture
• Advantages
– Very simple (centralized installation)
– Single point of control (centralized security)
• Disadvantages
– Host (server) can become a bottleneck
(processing problems)
– Upgrades typically expensive
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Based Architecture
• Client contains presentation, application, and data access
logic
• Most common in the 1980s
Processing Data
CLIENT SERVER
Presentation Logic Data Storage
Application Logic
Data Access Logic
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Based Architecture
• Advantages
– Hardware and applications less expensive
(multiple vendors for software and hardware)
– Simple architecture
• Disadvantages
– Data must travel back and forth between server and
client
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Most common architecture today
CLIENT balanced processing SERVER
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
More functionality Easier to manage
Thick-Client Architecture Thin-Client Architecture
CLIENT SERVER CLIENT SERVER
Presentation Logic Data Access Logic Presentation Logic Application Logic
Application Logic Data Storage Data Access Logic
Data Storage
Development and maintenance costs
can be higher than for thin clients.
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Advantages
– More efficient because of distributed processing
– Allows hardware/software from different vendors to be
used together (less expensive)
– Less bandwidth required
• Disadvantages
– May be challenges in configuring hardware/software
from different vendors to work together
– In many cases, middleware is required
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Middleware is software acts as an intermediary by “sitting
between” client and server applications
• Provides 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)
Client Server
Middleware
Applications Applications
of vendors x of vendors y
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Example of two-tier architecture
Two-tiered architectures have only clients and servers
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Example of three-tier architecture
(1) presentation logic, (2) application logic, and (3) and data access logic and storage
are separated.
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Client-Server Architecture
• Example of n-tier architecture
More than one tier may be used to support application logic, typically due to a
Web server tier being included
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Tiered Client-Server Architecture
• Advantages
– Load balancing (number of servers are increased)
– More scalable
• Disadvantages
– Each tier increases network load (more data transfer)
– More complex and difficult to develop applications
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Peer-to-Peer (P2P) Architecture
• An older architecture that became popular again with
Napster, BitTorrent, etc.
• All devices can act as client and server
CLIENT/SERVER CLIENT/SERVER
Presentation Logic Presentation Logic
Application Logic Application Logic
Data Access Logic Data Access Logic
Data Storage Data Storage
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Peer-to-Peer Architecture
• Advantages
– Resilient to failure
– Data can be stored anywhere on network
– Distributes bandwidth requirements (compared to one
server case)
• Disadvantages
– Finding the stored data
– Security
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Cloud Computing
• Cloud Computing is the general term for enabling access
to computing services over the network (most commonly
the Internet)
• Models of cloud computing define who manages each
application function and associated hardware/software
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Cloud Computing
• Cloud Computing Models
– Infrastructure as a Service (IaaS)
• All hardware is outsourced
– Platform as a Service (PaaS)
• Application logic and data are managed internally
• e.g., Microsoft Azure
– Software as a Service (SaaS)
• All application components and associated
hardware/software outsourced
• Based on multitenancy
• e.g. [Link]
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Cloud Computing
Traditional Thin-Client Infrastructure as a Platform as a Service Software as a Service
Client-Server Service (IaaS) (Paas) (SaaS)
Internal Outsourced Internal Outsourced Internal Outsourced Internal Outsourced
Application
Logic X X X X
Data Storage X X X X
Data Access
Logic X X X X
Operating
System X X X X
Virtualization
Software X X X X
Server
Hardware X X X X
Storage
Hardware X X X X
Network
Hardware X X X X
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Criteria for Choosing Architecture
• Infrastructure (hardware)
– Cost of servers, clients, and circuits
– Reliability
• Development Costs
– Software; cheaper on host-based architectures
• Scalability
– Ability to increase (or decrease) in computing capacity
as network demand changes
– Easier in client-server architectures
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
The Web
The standard protocol for
• Hypertext Transfer Protocol (HTTP) communication between a Web
• HTTP Request and Response browser and a Web server
Client
computer HTTP
Response
with Web
browser
software
HTTP
Web Server
Request
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
• HTTP Request Request line, starts with a command (e.g., GET), provides the
URL, and ends with the HTTP version number that the
browser understands.
Required
Optional
Request header contains a variety of optional information such as the Web browser being used (e.g.,
Internet Explorer), the date, and a userid and password for use if the Web page is password-protected.
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
contains the HTTP version number the server has used, a
status code (e.g., 200 means OK, 404 means page not found)
Optional
The Web
Optional
• HTTP Response
Required
Response body is the Web page itself.
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• Mail Transfer Agent (MTA)
– Formal name for mail server software
– e.g., Sendmail, Postfix,
• Mail User Agent (MUA)
– Formal name for mail client software
– e.g., Outlook, Apple Mail, Thunderbird
• Simple Mail Transfer Protocol (SMTP)
– Protocol used to send a message to a MTA (client to server)
– Originally only handled text files
• Internet Message Access Protocol (IMAP) or Post Office Protocol
(POP)
– Protocols used by a MUA to retrieve messages from an MTA (server
to client)
• American Standard Code for Information Interchange (ASCII)
– A standard for encoding text characters (a-z, A-Z, 0-9, a few symbols)
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• How a message is sent (2-tier, thick client)
• Sending Client → Sender’s Mail Server (SMTP)
• Sender’s Mail Server → Receiver’s Mail Server (SMTP)
• Message waits on Receiver’s Mail Server in “mailbox”
• Receiving Client → Receiver’s Mail Server (IMAP or
POP)
• Receiver’s Mail Server → Receiving Client (IMAP or
POP)
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• How a message is sent via webmail (3-tier, thin client)
1. Sending Client → Sender’s Web Server (HTTP)
2. Sender’s Web Server → Sender’s Mail Server (SMTP)
3. Sender’s Mail Server → Receiver’s Mail Server (SMTP)
4. Mail waits on Receiver’s Mail Server in “mailbox”
5. Receiving Client → Receiver’s Web Server (HTTP)
6. Receiver’s Web Server → Receiver’s Mail Server (IMAP
or POP)
7. Receiver’s Mail Server → Receiver’s Web Server (IMAP
or POP)
8. Receiver’s Web Server → Receiving Client (HTTP)
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• SMTP Message Format
– RFC 822: Standard for text Header
message format
• Header lines
– Contain information about the
message such as To, From, and
Subject Body
• Body section
– Contains the “content of the
message
– Begins with the “DATA”
keyword
– Only uses ASCII characters
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• Inside an SMTP packet
– Header: source, destination, date, subject, etc.
– Body: keyword “DATA”, then email message
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Email
• SMTP is a simple protocol to send plain text
• Not designed to send images or attachments
• Multipurpose Internet Mail Extension (MIME)
– A standard to extend support for attachments and non-
ASCII characters in email
– Used by sender to convert (encode) any non-ASCII
content into ASCII
– Receivers then convert (decode) the ASCII back to its
original format
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Other Application-Layer Protocols
• File Transfer Protocol (FTP) - for moving files between
clients and servers
• Telnet, Secure Shell (SSH) - for executing commands on
a remote system
• Internet Relay Chat (IRC), Extensible Messaging and
Presence Protocol (XMPP) - for real-time text chat
(instant messaging)
• Domain Name System (DNS) - for mapping domain
names to IP addresses
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Instant Messaging
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Video Conferencing
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Implications for Management
• Primary purpose of networks is to provide environment
for applications
• The number and types of applications on the network is
dramatically increasing
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.