Brendan Ang

Search

Search IconIcon to open search

Application Layer

Last updated Jan 18, 2023 Edit Source

# Application Layer

# Network Application Architectures

500 Examples:

# CS vs P2P File Distribution

500

# Client Server

# P2P

# Process Communication

Network applications on different hosts need a way to communicate with each other (sometimes across different operating systems). Client: process that initiates the communication Server: the other part of the pair

# Addressing Processes

To receive messages, a process must have an identifier. Each host has a unique IP address but this is not enough as there are many processes which can be running on the same host. A port number is needed to identify the receiving process/socket: HTTP server: 80 Mail server: 25

# Transport Service Requirements

  1. Data integrity: the amount of fault tolerance an application needs
  2. Throughput: rate which sending process can deliver bits to receiver. Because communication lines are shared, some bandwidth-sensitive applications (such as multimedia) may need a set throughout value.
  3. Timing: the amount of latency. An example guarantee might be that every bit that the sender pumps into the socket arrives at the receiver’s socket no more than 100 msec later. Such a service would be appealing to interactive real-time applications, such as multiplayer games.
  4. Security: encryption

# Application Layer Protocols

An application layer protocol defines:

# HTTP

The Web’s application layer protocol is HTTP.

# Electronic Mail

A typical message starts its journey in the sender’s user agent, travels to the sender’s mail server, and travels to the recipient’s mail server, where it is deposited in the recipient’s mailbox. When Bob wants to access the messages in his mailbox, the mail server containing his mailbox authenticates Bob (with usernames and passwords) Each user agent uses a separate mail server rather than directly connecting with each other such that there is some recourse (able to keep retrying to send a message) when the destination is currently unreachable.

# SMTP

The heart of Internet electronic mail is SMTP, which allows for the transfer of messages.

# Mail Access Protocol

SMTP is a push protocol. Mail access protocols are needed to retrieve mail from the mail server via a pull operation:

# DNS

Many application protocols are built on top of DNS.

# BitTorrent

The most popular P2P protocol for file distribution is BitTorrent

# Distributed Hash Table

Another application of P2P is a Distributed Hash Table

# Socket Programming

How are network applications actually created? Processes running on different machines communicate with each other through sockets.

# TCP

Network applications may communicate through TCP, and hence the connection socket must support TCP. TCP provides a reliable byte-stream service: Basic byte I/O classes in Java

# Client

The client must perform the following operations:

  1. Open TCP connection to the server
  2. Send data
  3. Receive data on the connection
  4. Close the connection

# Server

# Encoding/Decoding

To transfer a string between two processes over the network, we must decide how to represent the string as a sequence of bytes.

# ASCII

# UTF-8

# Helpful Java classes