Application Layer: Overview
Network Application Examples
Creating Network app
Network Application Architectures
Client-Server Architecture / Peer-to-Peer Architecture
Process Communicating
Client and Server Processes
The Interface Between the Process and the Computer Network – Socket
Addressing Processes
Transport Services Available to Applications:
Reliable Data Transfer, Throughput, Timing, Security
Transport Services Provided by the Internet
TCP Services / UDP Services
Application-Layer Protocols
Chapter 2: Application Layer
Book: Computer Networking: A Top Down Approach.
Author: Jim Kurose, Keith Ross Addison-Wesley
Our goals: learn about protocols by
conceptual and examining popular
implementation aspects application-layer
of application-layer protocols
protocols • HTTP
• transport-layer service • SMTP, IMAP
models • DNS
• client-server paradigm programming network
• peer-to-peer paradigm applications
• socket API
Since 2000
• voice and video applications
• voice over IP (e.g., Skype)
Internet applications • video conferencing over IP such
• classic text-based applications as Skype
• became popular in the 1970s • user-generated video
and 1980s distribution
• text email, remote access to • streaming stored video
computers, file transfers, and (YouTube)
newsgroups • movies on demand such as
• text messaging Netflix
Include the World Wide Web multi-user network games
• Encompassing surfing, Search, real-time video conferencing
Electronic Commerce
social networking
include (Facebook, Twitter, WhatsApp)
• instant messaging and
…
• P2P file sharing
application
At the core of network
transport
mobile network
network
data link
application development is physical
national or global ISP
• write programs that:
• run on (different) end systems
• communicate with each other over
the network
• E.g. Web application local or
regional
• two distinct programs that communicate ISP
with each other
home network content
• browser program running in the application
provider
transport
• user’s host (desktop, laptop, tablet, network network
application
datacenter
network
smartphone….) data link
physical
transport
network
• Web server program running in data link
physical
• Web server host
• e.g., web server software enterprise
network
communicates with browser sofware
application
when developing your new
transport
mobile network
network
data link
application physical
national or global ISP
• need to write software that will
run on multiple end systems
• for example, in C, Java, Python
no need to write software local or
regional
for network-core devices ISP
• network-core devices do not home network content
application
provider
run user applications transport
network network datacenter
application
network
• applications on end systems allows data link
physical
transport
network
for rapid app development, data link
propagation
physical
enterprise
network
application’s architecture is distinctly different from the network
architecture (e.g., the five-layer Internet architecture
From the application developer’s perspective,
the network architecture is fixed and provides a specific set of services to
applications.
The application architecture, on the other hand,
is designed by the application developer and
dictates how the application is structured over the various end systems.
Two application architecture
Client-Server architecture
peer-to-peer (P2P) architecture
two factors are involved :
Servers
• A server is the one who provides requested services.
• the server hosts, delivers, and manages most of the
resources and services requested by the client.
• Types:
• Mail servers:
• File servers
• Web servers:
Clients It is also known as the networking computing
• Clients are the ones who request services. model or client server network as all
requests and services are delivered over a
network.
For example, in hospital data processing,
• a client computer can be busy running an application
program for entering patient information, meanwhile
• the server computer can be running another program to
fetch and manage the database in which the information is
permanently stored.
server:
always-on host
permanent IP address
• Because the server has a fixed,
• well-known address, and
• the server is always on
often in data centers, for scaling
services requests from many other hosts
• clients:
• clients do not directly communicate with each other
• Web application,
• two browsers do not directly communicate
• contact, communicate with server
• may have dynamic IP addresses
• examples: Web, FTP, Telnet, email
two or more systems are connected together
and they share resources without the need of a
central server.
(P2P) architecture consists of a decentralized
network of peers –
• nodes that are both clients and servers
Some uses of P2P architecture:
• File sharing
• Instant messaging
• Voice Communication
• Collaboration
• High Performance Computing
Some examples of P2P architecture:
• BitTorrent
• Skype
• Bitcoin
no always-on server
application exploits direct communication between pairs
connected hosts, called peers
peers are not owned by the service provider mobile network
arbitrary end systems directly communicate national or global ISP
peers communicate without passing through a dedicated
server,
• the architecture is called peer-to-peer.
peers request service from other peers,
provide service in return to other peers local or
regional
• self scalability – new peers bring new service ISP
capacity, as well as new service demands home network content
provider
cost effective, network datacenter
network
• don’t require significant server infrastructure and server
bandwidth
peers are intermittently connected and change
IP addresses enterprise
network
• complex management
example: P2P file sharing
process: program running within a clients, servers
host
client process: process that
within same host, two processes initiates communication
communicate using inter-process server process: process that
communication (using rules
waits to be contacted
defined by OS)
processes in different hosts
communicate by exchanging
messages note: applications
with P2P
With the Web, a browser is a
client process and a Web server is
architectures have
a server process. client processes &
server processes
process sends/receives messages to/from its socket
A process is analogous to a house and
socket analogous to door
• sending process shoves message out door
• sending process relies on transport infrastructure on other side of door
to deliver message to socket at receiving process
• two sockets involved: one on each side
to receive messages, identifier includes both IP
process must have address and port numbers
identifier associated with process on
host device has unique 32- host.
bit IP address example port numbers:
Q: does IP address of host • HTTP server: 80
on which process runs • mail server: 25
suffice for identifying the to send HTTP message to
process? gaia.cs.umass.edu web server:
A: no, many • IP address: 128.119.245.12
processes can be • port number: 80
running on same
host
• Process-to-Process Communication using socket addresses
24.15
protocols are usually designed
types of messages by
exchanged, • companies/organizations for
serving a particular purpose
• e.g., request, response
open protocols:
message syntax:
defined in RFCs, everyone has
what fields in messages & access to protocol definition
how fields are defined allows for interoperability
message semantics e.g., HTTP, SMTP
• meaning of information in proprietary protocols:
fields • usually designed by manufacturers
for usage with their own products
rules for when and how only
processes send & respond to • e.g., Skype
messages
Many networks, including the Internet,
provide more than one transport-layer protocol.
When you develop an application,
you must choose one of the available transport-layer protocols.
How do you make this choice?
Most likely, you would study the services provided by the available transport-layer
protocols, and then pick the protocol with the services that best match your application’s
needs
We can broadly classify the possible services along four dimensions:
• reliable data transfer,
• throughput,
• timing, and
• security.
packets lost within a computer network
• overflow a buffer in a router
• discarded by a host or
• router after having some of its bits corrupted
guarantee
• data sent by one end of the application is delivered correctly and completely to the
other end of the application
• transport-layer protocol can potentially provide
• to an application is process-to-process reliable data transfer
Reliable data Transfer
some apps (e.g., file transfer, web transactions) require 100% reliable data
transfer
other apps (e.g., audio) can tolerate some loss
transport-layer protocol can potentially provide to an application is process-to-
process reliable data transfer
timing guarantees:
many shapes and forms
every bit
• that the sender pumps into the socket arrives at the receiver’s socket
• no more than 100 msec later.
• interactive real-time applications
some apps (e.g., Internet telephony, interactive games) require
low delay to be “effective”
throughput
guaranteed available throughput at some specified rate
some apps (e.g., multimedia) require minimum amount of throughput to
be “effective”
bandwidth-sensitive applications
bandwidth-sensitive applications have specific throughput requirements, .
other apps (“elastic apps”) make use of whatever throughput they get
Electronic mail,
file transfer, and
Web transfers are all elastic applications.
security
sending host,
a transport protocol can encrypt all data transmitted by
the sending process,
receiving host,
the transport-layer protocol can decrypt the data before
delivering the data to the receiving process
other security services
encryption,
data integrity,
end-point authentication …
TCP service: UDP service:
reliable transport between sending and unreliable data transfer between
receiving process sending and receiving process
flow control: sender won’t overwhelm does not provide: reliability, flow
receiver control, congestion control,
congestion control: throttle sender timing, throughput guarantee,
when network overloaded security, or connection setup.
does not provide: timing, minimum
throughput guarantee, security
connection-oriented: setup required
between client and server processes