You are on page 1of 16

Application Layer

2: Application Layer 1
Some network apps
 E-mail  Internet telephone
 Web  Real-time video
 Instant messaging conference
 Remote login  Massive parallel
 P2P file sharing computing
 Multi-user network
games
 Streaming stored
video clips

2: Application Layer 2
Creating a network app
Write programs that application
transport
network
 run on different end data link
physical
systems and
 communicate over a
network.
 e.g., Web: Web server
software communicates
with browser software
No software written for application
application

devices in network core


transport
transport network
network data link
data link
 Network core devices do physical
physical

not function at app layer


 This design allows for
rapid app development
2: Application Layer 3
 Entities at Application Layer include:
 Distributed Applications e.g. Web, Email, File
Transfer
 Application Layer protocols e.g. HTTP, SMTP, FTP

2: Application Layer 4
Network Application Architectures
 Client-server
 Peer-to-peer (P2P)
 Hybrid of client-server and P2P

2: Application Layer 5
Client-server archicture
server:
 always-on host
 permanent IP address
 server farms for scaling
clients:
 communicate with server
 may be intermittently
connected
 may have dynamic IP
addresses
 do not communicate
directly with each other
Examples?

2: Application Layer 6
Pure P2P architecture
 no always on server
 arbitrary end systems
directly communicate
 peers are intermittently
connected and change IP
addresses
 example: Gnutella

Highly scalable

But difficult to manage


2: Application Layer 7
Hybrid of client-server and P2P
Napster
 File transfer P2P
 File search centralized:
• Peers register content at central server
• Peers query same central server to locate content
Instant messaging
 Chattingbetween two users is P2P
 Presence detection/location centralized:
• User registers its IP address with central server
when it comes online
• User contacts central server to find IP addresses of
buddies

2: Application Layer 8
Processes communicating
Process: program running Client process: process
within a host. that initiates
 within same host, two communication
processes communicate Server process: process
using inter-process that waits to be
communication (defined contacted
by OS).
 processes in different  Note: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes

2: Application Layer 9
Sockets
host or host or
 process sends/receives server
server
messages to/from its
socket controlled by
app developer
 socket analogous to door process process

 sending process shoves socket socket

message out door TCP with TCP with


buffers, Internet buffers,
 sending process relies on variables variables
transport infrastructure
on other side of door which
controlled
brings message to socket by OS
at receiving process
 The process assumes that there is a transportation
infrastructure on the other side of the door that
will transport the message to the door of 2:the
Application Layer 10
destination process
 Since the socket is the programming interface with
which networked applications are built in the Internet..
The application developer has control of everything on
the application-layer side of the socket but has little
control of the transport-layer side of the socket
 The only control that the application developer has on
the transport-layer side is (i) the choice
of transport protocol and (ii) perhaps the ability to fix
a few transport-layer parameters such as maximum
buffer and maximum segment sizes

2: Application Layer 11
Addressing Processes
(Port Numbers)

Web Server Mail Server

Port = 80 Port = 25

TCP

IP = 138.110.1.1

2: Application Layer 12
App-layer protocol defines
 Types of messages Public-domain protocols:
exchanged, eg, request &  defined in RFCs
response messages
 allows for
 Syntax of message
types: what fields in interoperability
messages & how fields  eg, HTTP, SMTP
are delineated Proprietary protocols:
 Semantics of the fields,
 eg, KaZaA
ie, meaning of
information in fields
 Rules for when and how
processes send &
respond to messages
2: Application Layer 13
Applications and App-Layer Protocols

UI

HTTP
Web Server

Web Browser

File
HTTP … Access

2: Application Layer 14
What transport service does an app need?
Data loss Bandwidth
 some apps (e.g., audio) can  some apps (e.g.,
tolerate some loss multimedia) require
 other apps (e.g., file
minimum amount of
transfer, telnet) require bandwidth to be
100% reliable data
“effective”
transfer
 other apps (“elastic
Timing
apps”) make use of
 some apps (e.g.,
whatever bandwidth
Internet telephony,
they get
interactive games)
require low delay to be
“effective”
2: Application Layer 15
Transport service requirements of common apps

Application Data loss Bandwidth Time Sensitive

file transfer no loss elastic no


e-mail no loss elastic no
Web documents no loss elastic no
real-time audio/video loss-tolerant audio: 5kbps-1Mbps yes, 100’s msec
video:10kbps-5Mbps
stored audio/video loss-tolerant same as above yes, few secs
interactive games loss-tolerant few kbps up yes, 100’s msec
instant messaging no loss elastic yes and no

2: Application Layer 16

You might also like