Application Layer.

Application Layer Basics

Processes running on different computers communicate with each other by exchanging message across the computer network. It's important to distinguish between network applications and network-layer protocols. For example, Web application consists of many components:
  • web browser
  • web server
  • standard document format (like HTML)
  • and an application-layer protocol (HTTP).

    Application layer protocol defines:

  • The types of messages exchanged, for example, request messages and response messages.
  • The syntax of the various message types, such as the fields in the message and how the fields are delineated.
  • The semantics of the fields, that is, the meaning of the information in the fields.
  • Rules for determining when and how a process sends messages and responds to messages.

    Typically a network application has two parts or "sides", a server side and a client side. Let's agree that the host that initiates the session is labeled the client.

    Ideas of

  • socket as a door between the application layer and transport layer;
  • IP address
  • destination port number

    User agent is an interface between the user and the network.

    Application's needs and available services

    Needs:
  • Reliable data transfer (loss-tolerant applications vs. no loss-tolerant ones)
  • Bandwidth. Some application must be able to transfer data at a certain rate in order to be effective. For example, Internet telephony requires at least 32 Kbps. (band-width sensitive vs. elastic applications.)
  • Timing. Some application require timing constraints on data delivery in order to be effective.

    Available services from the Transport Layer:

  • TCP -- connection-oriented reliable transport service.
  • UDP -- no-frills, lightweight transport protocol

    Telnet protocol

  • transport layer service used: TCP
  • port number: 23

    HTTP protocol

  • transport layer service used: TCP
  • port number: 80
  • maintaining information about the client: No => stateless protocol
  • type of connection: persistent or non-persistent

    Client side messages

    Client side message format:

    Server side messages

    The server side message format is:

    The status code and associated phrase indicate the result of the request. Some common status codes and associated phrases include:

    This page will help you to see server side messages.

    Some useful links:

  • HTTP/1.0: http://www.rfc-editor.org/rfc/rfc1945.txt
  • HTTP/1.1: http://www.rfc-editor.org/rfc/rfc2068.txt
  • Cookies: http://home.netscape.com/newsref/std/cookie_spec.html