Application Layer Protocol : HTTP

Application Layer Protocol explains how the data is being transferred from one application to the other. It also includes:

  1. The type of the messages that are exchanged.
  2. Syntax of the various messages
  3. Semantics of the message more generally the structure
  4. Rules for sending the messages and how the process responds to the messages.

Eg: HTTP ie, the web application layer protocol

Difference between the application layer protocol and the network applications?

Application Layer protocols are just a part of the network applications. For instance we have HTTP, SMTP, these protocols provide a method to transfer data to the another program in the client. Network applications for example emails.

Different Types of Application Protocols

There are five different types of protocols explained here:

Web and HTTP : HTTP or Hyper Text Transfer Protocol is Protocol that is used in an application layer.

  1. Web Page:
  2. URL: Consider the following url https:www.amrita.edu/aums/index.php here which has the following components:
    1. The protocol : HTTP
    2. Host/Server : www.amrita.edu
    3. Folder: Aums
    4. Page: Index.php
  3. Object: An object of a particular web page is refered to the components in that web page like a image, gifs etc.
  4. Web Browsers: HTTP that implements the client side is referred to as Web Browsers. eg: Mozilla Firefox
  5. Web Servers: HTTP that implements the server side is referred to as Web Server. eg: Apache
  6. HTTP client requests for the a particular web page, whose request is send to the web server via the help of the TCP protocol. The TCP protocol implements a handshake and later on passes the data through a reliable connection.
  7. HTTP server does not keep track of the details of the client and hence more preferably called as the Stateless Protocol. For instance at time t= 0 a connection was made and a transfer of data took place, after some time the same client asked for the same data at time t = 5 then the data will be again tranfered as the HTTP request is connectionless.
  8. Non Persistent Connection: If each of the request has to be sent in different TCP connection then we call it as non-persistent connection. TCP connection transmits exactly one service message in this connection. With the concept of parallel connection, we can set the values of maximum number of parallel connections. Round Trip Time (RTT), is the time taken by a request to be processed i,e request to travel from the client to the server and from the server back to the client. This include all the four types of delays mentioned also.
  9. Persistent Connection: If each of the request has to be sent in one single connection then we can call it as a persistent connection. This comes to the advantage when we get to point out the disadvantages of the TCP non-persistent connection. If for each message transfer we need to intiate a new connection where TCP variables and buffers are reserved, this can place significant burden in the web server. We can see that each of the connection takes up a delay of 2 RTT, which is not evident here in the persistent connection because once the connection is set then till the transfer is over the connection will be open.
  10. HTTP Message Format: HTTP messages are human readable form that is in using ASCII character.There are two types of message formats:
    1. HTTP Request: It has five main parts, where there are classified into two: one for the request lines and the rest for the header lines. Consider the below five lines:
      1. GET : This is called as the request line. This line basically has three fields that are the method field, URL field, the HTTP field, HTTP version field. The other examples for method fields are GET, POST, HEAD, PUT, DELETE. The GET method is used when the user request some message.
      2. HOST: Necessary for the Web Proxy caches.
      3. Connection: If we have the case Connection : Close then we are mentioning on not to bother about the persistent connnectino to close the connection after the request has been granted.
      4. User Agents : The browser you are using.
      5. Accept- Language: The langugae that is acceptable by the user. It is one of the content negotiation header available.
    2. HTTP Response: The HTTP response message has three areas:
      1. The Status lines : The first one is called as the status line which gives the details of the HTTP Version , the status code and the status message. There are different status codes like:
        1. 200 : OK
        2. 404: Not Found
        3. 400: Bad Request
        4. 500: HTTP Version not supported There are basically six header lines likes
      2. The header lines:
        1. Connection: For instance Connection: CLOSE where ot says that we can immediatley close connection after the response is granted.
        2. Server: Refers to the server which is serves the request.
        3. Last-Modified: The date and time when the data response is been served.
        4. Content-length: The number of bytes in the object being sent
        5. Content-Type: Indicates the type of the HTML text.
      3. Entity body
  11. Cookies: They collect the the data in the browser. Cookies help remember the browsing details. There are basically three two types of cookies like:
    1. Tracking Cookies: The one in instance.
    2. First Party Cookies: For instance, the one used by the shopping sites that keep details like the cart etc.
    3. Web-Proxy: Web-Cache or Proxy server is a network entity that satisfies the HTTP request on behalf of the origin server. There is a disk storage in the Web cache that keeps the track of the recently visited cookies. A Web cache can work both as a client and a server. When it receives requests from and sends responses to a browser, it is a server. When it sends requests to and receives responses from an origin server, it is a client
      1. Firewalls: To prevent the usage of certain sites.
      2. Anonymous Surfing:
      3. Advantages:
        1. Reduces the response time for a client request i,e for instance if the data is availabe in the cache then the time requireed to fetch it from the cache is much lesser than that from the origin server.
        2. Reduces traffic
 PreviousNext