1.Client Server Application Layer-Introduction
1.Client Server Application Layer-Introduction
Application Layer
Application 2-3
Some network apps
❖ e-mail ❖ voice over IP
❖ web ❖ real-time video
❖ instant messaging conferencing
❖ remote login ❖ cloud computing
❖ P2P file sharing ❖ …
❖ multi-user network ❖ …
games ❖
❖ streaming stored video
(YouTube)
Application 2-4
Creating a network app application
transport
network
data link
Application 2-5
Chapter 2: Application layer
2.1 Principles of network 2.6 P2P applications
applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP
2.5 DNS
Application 2-6
Application architectures
❖ client-server
❖ peer-to-peer (P2P)
❖ hybrid of client-server and P2P
Application 2-7
Client-server architecture
server:
▪ always-on host
▪ permanent IP address
▪ server farms for
scaling
clients:
client/server ▪ communicate with server
▪ may be intermittently
connected
▪ may have dynamic IP
addresses
▪ do not communicate
directly with each other
Application 2-8
Pure P2P architecture
❖ no always-on server
❖ arbitrary end systems
directly communicate peer-peer
❖ peers are intermittently
connected and change IP
addresses
Application 2-9
Hybrid of client-server and P2P
Skype
▪ voice-over-IP P2P application
▪ centralized server: finding address of remote
party:
▪ client-client connection: direct (not through
server)
Instant messaging
▪ chatting between two users is P2P
▪ centralized service: 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
Application 2-10
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 ❖ aside: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes
Application 2-11
Sockets
❖ process sends/receives host or
host or
messages to/from its server server
socket
controlled by
❖ socket analogous to door app developer
process process
▪ sending process shoves
message out door socket socket
Application 2-13
Addressing processes
❖ to receive messages, ❖ identifier includes both
process must have IP address and port
identifier numbers associated with
❖ host device has unique process on host.
32-bit IP address ❖ example port numbers:
❖ Q: does IP address of ▪ HTTP server: 80
host on which process ▪ Mail server: 25
runs suffice for ❖ to send HTTP message
identifying the process? to gaia.cs.umass.edu web
▪ A: No, many server:
processes can be ▪ IP address: 128.119.245.12
running on same host ▪ Port number: 80
❖ more shortly…
Application 2-14
App-layer protocol defines
❖ types of messages public-domain protocols:
exchanged, ❖ defined in RFCs
▪ e.g., request, response ❖ allows for
❖ message syntax: interoperability
▪ what fields in messages & ❖ e.g., HTTP, SMTP
how fields are delineated
proprietary protocols:
❖ message semantics
▪ meaning of information in ❖ e.g., Skype
fields
❖ rules for when and how
processes send &
respond to messages
Application 2-15
What transport service does an app need?
Data loss Throughput
❖ 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 throughput to be
100% reliable data “effective”
transfer
❖ other apps (“elastic apps”)
Timing make use of whatever
❖ some apps (e.g., throughput they get
Internet telephony,
interactive games) Security
require low delay to be ❖ encryption, data integrity,
“effective” …
Application 2-16
Transport service requirements of common apps
Application 2-17
Internet transport protocols services
Application 2-18
Internet apps: application, transport protocols
Application Underlying
Application layer protocol transport protocol
Application 2-19