0% found this document useful (0 votes)
39 views

Application Layer Lecture

Computer networking
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Application Layer Lecture

Computer networking
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

COE 475: Computer Networking

Lecture2: Application Layer


Lecture Objective

• Students should understand basic concepts and


implementation aspects of network applications
– sockets
– identifiers
– application architecture
– popular application layer protocols
– etc.
Introduction
• The main task at the application layer is
– network application development
• at the core of network application development is writing programs
• discuss
– network application design principle
– the predominant application architectures
– how applications are interfaced with the network
• process communication
• process addressing
– popular application-layer protocols
Basic Concept

– Many network applications consist of a


• pair of programs residing in two different end systems
– When these programs are executed
• processes are formed
– these processes communicate with each other by sending
» messages across the network
Network Application Design Principle
applicatio
n
• Confine application software to transport
network

end systems (why)


data link
physical

– Network-core devices do not run user


applications
• Need to have
– architectural plan for the application

applicatio
n
transport
network
applicatio
data link
n
physical
transport
network
data link
physical
Application Architectures
• Application architecture dictates
– how the application is structured over the various end systems
• Two predominant architectural paradigms
– Client-server architecture
– Peer-to-peer (P2P) architecture
Client-Server Architecture
server:
– always-on host
– services requested from by
• many other hosts called clients
– permanent IP address
– server farms
clients:
client/server – communicate with server
– may have dynamic IP addresses
– do not communicate directly with
each other

Infrastructure intensive and costly to provide


Pure P2P Architecture
• no always-on server
• direct communication between
peers
• peers are intermittently
connected and change IP
addresses
peer-peer

Highly scalable but difficult to manage


Hybrid of client-server and P2P
Skype
– voice-over-IP P2P application
– centralized server:
• finds address of remote party
– client-client connection:
• direct (not through server)
Instant messaging
– centralized server:
• client presence detection/location
– user registers its IP address with central server when it comes
online
– user contacts central server to find IP addresses of buddies
– chatting between two users is P2P
Processes Communicating
Process:
• A process is a program that is running within an end system
• Processes running on different hosts communicate with each other by
exchanging messages
• across the computer network
– Web application
• client browser process exchanges messages with a web server process
• For each pair of communicating processes
– the process that initiates the communication is labeled the client
– the process that waits to be contacted is the server
Interface between the process and the network

• A process sends messages host or host or


server server
into, and receives messages
from, the network through a controlled by
– software interface called a app developer
process process
• Socket
socket socket
• sending process
TCP with TCP with
– shoves a message out the socket buffers, network buffers,
and assumes that there is a variables variables
• transport infrastructure on the
other side of the socket that will controlled
transport the message to the by OS
socket of the destination process
Interface between the process and the network
• The socket is the interface between the
– application layer and the transport layer
• also referred to as the
– Application Programming Interface (API)
Addressing processes
• to receive messages, • identifier includes both IP
process must have address and port numbers
identifier associated with process
• host device has unique on host.
32-bit IP address • Example port numbers:
• Q: does IP address of – HTTP server: 80
host on which process – Mail server: 25
run suffice for identifying • to send HTTP message to
the process? – knust.edu.gh web server:
– A: No, many • IP address: 206.225.80.197
• Port number: 80
processes can be
running on same host
Addressing processes
• How does a process indicate which process it wants to
communicate with?
– To identify the receiving process
• two pieces of information need to be specified
– the name or address of the host (IP address)
– an identifier that specifies the receiving process in the
destination host
» destination port number
– Popular applications have been assigned specific port numbers
• Web (HTTP) server process: 80
• Mail server process: 25
– List of port numbers at http://www.iana.org
Application-layer protocol
• Learnt that
– network processes communicate with
• each other by sending messages into sockets

• Questions
– How are these messages structured?
– What are the meanings of the various fields in the messages?
– When do the processes send the messages?
• these questions bring us into the realm of
– application - layer protocols
Application-layer protocol
• Defines the
– format, sequence and meaning of messages that application’s
processes pass to each other
– Rules for when and how processes send & respond to
messages

Public-domain protocols:
• e.g., HTTP, SMTP
Proprietary protocols:
• e.g., Skype
Popular Network Applications
• The following are popular network applications:
– the web
– electronic mail
– file transfer
– P2P file distribution
The Web application
• It is
– a client – server application that allows users to
• obtain documents from web servers on demand
– made up of
• a standard for document formats (HTML)
• web browsers (firefox, MS Internet Explorer)
• web servers (Apache, MS servers)
• an application-layer protocol – HyperText Transfer Protocol (HTTP)
• HTTP defines the
– Format, sequence and meaning of the messages that are
• passed between a browser and a server
The Web and HTTP
• General interaction between client
and server is described below HT
TP
r equ
• When a user requests a Web page H
PC running TT est
Pr
Explorer or esp
– the browser sends HTTP Chrome ons
e
request messages for the
• objects in the page to the server st
u e
– the server receives the requests req se Server
T P n
HT spo running
and responds with r e
T TP Apache Web
• HTTP respond messages that H server
contain the objects
Mac running
Navigator or Safari
Web caches (proxy server)
Goal: satisfy client request without involving origin server

• user sets browser: Web origin


server
accesses via cache
• browser sends all HT Proxy
TP st
HTTP requests to req server reque
H ues se
client TTP t T TP on
cache re s
pon
H
r esp
se H TTP
– object in cache: cache e st
u
returns object req se
P n
HT
T
spo
– else cache requests Pr
e
T
object from origin server, HT
then returns object to client
client
Electronic Mail
• It is
– a client – server application
– made up of
• mail servers (house mailboxes)
• mail readers (user agents)
– allow users to read and create messages
• an application-layer protocol – Simple Mail Transfer Protocol (SMTP)
• SMTP defines how
– messages are passed between servers
– messages are passed between servers and mail readers
– the contents of certain parts of the mail message are to be
interpreted
Electronic Mail
user
Mail Servers agent
• mailbox mail
user
– contains incoming messages for user server
agent
• message queue SMTP
mail
– of outgoing (to be sent) mail
server user
messages
SMTP agent
• SMTP protocol between mail servers
to send email messages SMTP
– client: sending mail server mail user
server agent
– “server”: receiving mail server
user
agent
user outgoing
agent message queue
user mailbox
Popular Internet Applications
Some network apps
• e-mail • voice over IP
• web • real-time video
• instant messaging conferencing
• remote login • grid computing
• P2P file sharing •
• multi-user network games •
• streaming stored video •
clips
Review questions
• What is the difference between network architecture and application
architecture
• For a communication session between a pair of processes, which is
the client and which is the server
• What is meant by handshaking protocol

You might also like