Application Layer Is an End-to-End Layer
A network application consists of programs running on different end systems that communicate by exchanging messages.
For example:
- A YouTube client communicating with YouTube’s servers
- Two peers exchanging pieces of a file
- An e-mail client communicating with a mail server
The fundamental design process is:
- Choose an application architecture.
- Decide which processes communicate.
- Give each process an address.
- Define the messages they exchange.
- Choose TCP or UDP and access it through sockets.
Process
Process: program running within a host
- within the same host, two processes communicate using inter-proces communication (defined by OS).
- processes in different hosts communicate by exchanging messages.
Client Process
- process that initiates communication.
- may have dynamic IP addresses
Server Process: - process that waits to be contacted.
- usually permanent IP address
Addressing Processes
A process endpoint is identified using:
IP address + port number
The IP address selects the host. The port number selects the appropriate process or socket on that host:

Sockets: the application’s door to the network
A socket is the interface between an application process and the transport layer.
Thus, every exchange involves at least two sockets:

This provides interface between client and server.
Application Layer Procotols define:
- Type of messages exchanged
- e.g, request, response
- Message Syntax
- What fields in messages & how fields are structured
- Message semantics
- Meaning of information in fields
- Rules for how processes send & respond to messages.
What service do we need from transport layer?
- Reliable data transfer
- Some apps require 100% reliability
- Some apps can tolerate loss
- Timing
- Some apps require low delay to be effective
- Throughput
- Some apps require minimum amount of throughput to be effective
- e.g. voice call
- Some apps (elastic) make use of whatever throughput they get
- e.g. file upload
- Some apps require minimum amount of throughput to be effective
- Security
- Encryption, data integrity, etc.
Requirement example of common applications
| Application | Data Loss | Throughout | Time sensitive? |
|---|---|---|---|
| File transfer | No loss | elastic | No |
| No loss | elastic | No | |
| Real-time audio/video | Loss-tolerant | audio: 5Kbps - 1Mbps video: 10Kbps - 5Mbps | yes, 10’s msec |
| Interactive games | Loss-tolerant | Kbps+ | yes, 10’s msec |
Socket Programming
There are two socket types for transport layer services:
- TCP: reliable, byte stream-oriented
- UDP: unreliable datagram
| Application | Application-layer protocol | Transport |
|---|---|---|
| File transfer | FTP | TCP |
| SMTP | TCP | |
| Web documents | HTTP/1.1 | TCP |
| Internet telephony | SIP, RTP, or proprietary protocols | TCP or UDP |
| Streaming audio/video | HTTP, DASH | UDP or TCP |
| Interactive games | Proprietary game protocols | UDP or TCP |
A project is done on socket programming: Socket Programming
More details are in 01-Transport Layer (UDP) Overview