Chapter 2: Application Layer

Table of Contents

  • 2.1 Principles of Network Applications
    • 2.1.1 Network Application Architectures
    • 2.1.2 Process Communicating
    • 2.1.3 Transport Services Available to Applications
    • 2.1.4 Transport Services Provided by the Internet
    • 2.1.5 Application-Layer Protocols
    • 2.1.6 Network Applications Covered in This Book
  • 2.2 The Web and HTTP
  • 2.3 File Transfer: FTP
  • 2.4 Electronic Mail in the Internet
  • 2.5 DNS The Internet’s Directory Service
  • 2.6 Peer-to-Peer Applications
  • 2.7 Socket Programming: Creating Network Applications
  • 2.8 Summary

2.1 Principles of Network Applications

  • Software you write should not need to actually have to be directly interact with network-core devices
  • 2.1.1 Network Application Architectures
    • Application architecture is distinctly different from the network architecture (5 layer)
    • For a application developer all lower layers act as services
    • The application architecture is designed by the developer and is structured on end systems to the developer’s desires
    • There are 2 major types of architectures client-server and P2P
      • Capture.PNG
      • Client-Server Architecture
        • Always-on host which acts as the server
          • Servers have a fixed IP address
        • Servers are often collections of servers in a data center that act together as one virtual server
        • Clients do not directly contact each other
        • Clients only contact the server
      • Peer-to-Peer Architecture
        • Peers directly communicate with each other
        • Little to no reliance on dedicated server
      • Client-Server vs P2P?
        • P2P offers self-scalability
          • For each client that’s added it will also serve as a “server” to offer connections to other clients
        • P2P is harder to secure because peers have direct access to each other
  • 2.1.2 Processes Communicating
    • Processes on end systems communicate with each other using application level messages
    • Client and Server Processes
      • Network applications consist of pairs of processes that send messages to each other over a network
      • One of these is the client and the other is the server
    • The Interface Between the Process and the Computer Network
      • Capture.PNG
      • Processes receive and send messages through the network through a software interface called a socket
        • Think about this as the door to a house all things in and out must go through that door
      • A socket has its own API between application and network
      • This means that application developers only have access to what the API gives access to and thus there is very little control over the network components
    • Addressing Processes
      • Two pieces of information are required to identify a receiving process
        1. Address of host (IP address)
        2. An identifier that specifies the receiving process in the destination host (port number)
          • Note some services over time have been given their own dedicated ports
  • 2.1.3 Transport Services Available to Applications
    • Non/Reliable Data Transfer
      • Reliable data transfer ensures that any packet that leaves a socket will be guaranteed to reach its destination even if a packet is dropped
      • If a packet is dropped it is re-transmitted
      • Loss-Tolerant applications don’t care if some packets are dropped often times these are multimedia applications
    • Throughput
      • Throughput is defined as the rate at which the sending process can deliver bits to the receiving process
      • This rate is a fluctuating value and thus often reliable data transfer protocols will offer guaranteed speed
      • Bandwidth-sensitive Applications: Applications that depend on a minimum speed (eg. calls)
      • Elastic Applications: Applications that can suffer hits to throughput or random speeds (eg. sending email)
    • Timing
      • Timing Guarantee is a guarantee that any bit that leaves arrives at the other socket within a guaranteed amount of time
      • Multiplayer games such as FPS games rely on low ping in order for it to feel as real time as possible
    • Security
      • Transport protocol can provide security by encrypting the data
  • 2.1.4 Transport Services Provided by the Internet
    • Internet uses UDP and TCP
    • TCP Services
      • TCP service model is a connection-oriented service and a reliable transfer service
      • Connection-Oriented Service: Client and server must identify and complete a handshake
        • After handshake a TCP connection is established
        • Once an application finishes sending messages the connection must be terminated
      • Reliable data transfer service: Relies on TCP to guarantee that every packet is sent without error in the proper order
      • TCP also contains a congestion control mechanism throttling the sending process if its sending things too fast
    • UDP Services

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s