Tuesday, 18 December 2018

HTTP Basic


  • As Hethmon notes in "An Illustrated Guide to HTTP, "the web is the largest client/server system implemented to date." It is also the most complex and heterogeneous one that must deal with multitudes of operating systems, human languages, programming languages, software, hardware, and middleware.
  • What is a client/server system?
  • A client/server system is a very keen way of distributing information across information systems like a local area network (LAN), a wide area network (WAN), or the Internet.
  • A client/server system works something like this: A big hunk of computer (called a server) sits in some office somewhere with a bunch of files that people might want access to. This computer runs a software package (uh...also called a server unfortunately) that listens all day long to requests over the wires.
The "wires" is possibly a twisted pair network hooked into a local telephone company POP or a cable or fiber optics network hooked up to a corporate WAN or LAN that is also linked up to the national telecommunications/information infrastructure through a local telephone company. Whatever the case, the specifics of the information infrastructure is beyond the scope of this tutorial, but should be mentioned.
  • Typically, these requests will be in some language and some format that the computer understands, but in English sound something like, "hello software package running on a big hunk of computer, please give me the file called "mydocument.txt" that is located in the directory "/usr/people/myname".
  • The "server software" will then access the server hardware, find the requested file, send it back over the wires to the "client" who requested it, and then wait for another request from the same or another client.
  • Usually, the "client" is actually a software program, like Netscape Navigator, that is being operated by a person who is the one who really wants to see the file. The client software however, deals with all the underlying client/server protocol stuff and then displays the document (that usually means interpreting HTML, but we'll get there in just a bit) to the human user.
  • The whole process looks something like the figure below:








  • So if the web is a huge client/server system, what is the underlying client/server protocol that is used by the client software and the server software for communication?
  • Well the client/server protocol used by the web is HTTP (HyperText Transport Protocol).
  • HTTP is a protocol that is defined in several RFC´s (Request for Comments) located at the Internic and has had several generations worth of revisions (HTTP/09, HTTP/1.0 and HTTP/1.1).
  • HTTP is a "request-response" type protocol that specifies that a client will open a connection to a server then send a request using a very specific format. The server will then respond and close the connection. 

Although an understanding of HTTP is not strictly necessary for the development of web applications, some appreciation of "what's under the hood" will certainly help you to develop them with more fluency and confidence. As with any field of endeavour, a grasp of the fundamental underlying principles allows you to visualise the structures and processes involved in the CGI transactions between clients and servers - giving you a more comprehensive mental model on which to base your programming.
Underlying the user interface represented by browsers, is the network and the protocols that travel the wires to the servers or "engines" that process requests, and return the various media. The protocol of the web is known as HTTP, for HyperText Transfer Protocol. HTTP is the underlying mechanism on which web application operates, and it directly determines what you can and cannot send or receive.
Tim Berners-Lee implemented the HTTP protocol in 1990-1 at CERN, the European Center for High-Energy Physics in Geneva, Switzerland. HTTP stands at the very core of the World Wide Web. According to the HTTP 1.0 specification,
The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia information systems. It is a generic, stateless, object-oriented protocol which can be used for many tasks, such as name servers and distributed object management systems, through extension of its request methods (commands). A feature of HTTP is the typing and negotiation of data representation, allowing systems to be built independently of the data being transferred.

No comments:

Post a Comment