HTTP Applet

   


HyperText Transfer Protocol (HTTP)


Theoretical Background

How to use the applet

Start the applet  
 


Basic knowledge about the World Wide Web

The World Wide Web “WWW” is an Internet service that organizes information using hypermedia; wich is a mixture of hypertext (Information pages that point to other pages) with other media like audio, video, images, Applets, etc... .

  • The key-characteristics of the WWW are:
  • Easy to access: everyone who has an Internet connection (ISDN, Modem,...)can access it.
  • It is the union of all the hypermedia contents provided by governments, organizations, technology institut, and individuals.
  • It brings the Internet to the local machine in an easy-to-use manner.

The basic web architecture is characterized by a web client known as “BROWSER” (Netscape, Internet-Explorerer, Mosaic, Hotjava,...) that displays information content and a web server known as “HTTP-Server” that transfers information to the client. This architecture depends on three key standards: HTML for encoding document content, URLs for naming remote information objects in a global namespace, and HTTP for data transfer.

 

 


HyperText Markup Language (HTML)

The HyperText Markup Language (HTML) had a first public release as HTML 0.0 in 1990.  The September 22 1995 draft of the HTML 2.0 specification has been approved as a standard by the IETF Application Area HTML Working Group (ftp://ds.internic.net/rfc/rfc1866.txt). HTML 3.0 and Netscape HTML are competing next generations of HTML 2.0. Proposed features in HTML 3.0 include: forms, style sheets, mathematical markup, and text flow around figures.

HTML files are viewed using a WWW client browser (software), the primary user interface to the Web. HTML allows for embedding of images, sounds, video streams, form fields and simple text formatting. References, called hyperlinks, to other objects are embedded using URLs (see below). When an object is selected by a hyperlink, the browser takes an action based on the URL's type, e.g., retrieve a file, connect to another Web site and display a HTML file stored there, or launch an application such as an E-mail or newsgroup reader.

 

 


Universal Resource Identifier (URI)

Universal Resource Identifier (URI) - an IETF addressing protocol for objects in the WWW. There are two types of URIs, Universal Resource Names (URN) and the Universal Resource Locators (URL). URLs are location dependent and contain four distinct parts:

  • the protocol type (http, ftp, gopher, wais,...)
  • the machine name
  • the directory path and
  • the file name.
 


HyperText Transfer Protocol (HTTP)

Tim Berners-Lee, father of the Web, describes the HyperText Transfer Protocol (HTTP) - an application-level network protocol for the WWW- as a "generic stateless object-oriented protocol." Stateless means neither the client nor the server store information about the state of the other side of an ongoing connection. Statelessness is a scalability property but is not necessarily efficient since HTTP sets up a new connection for each request, which is not desirable for situations requiring sessions or transactions. In HTTP, commands (request methods) can be associated with particular types of network objects (files, documents, network services).

The format of the request and response massages are similar, and English-oriented. Both kinds of messages consist of:

  • an initial line
  • zero or more header lines
  • a blank line (CRLF = Carrige Return Line Feed)
  • an optional message body (file, query data, query output)

The initial line is different for the request than for the response. A request line has three parts, separated by spaces: a method name, the local path of the requested resource, and the version of HTTP being used:

Method /path/to/file.html HTTP-version

GET “give me the data” is the most common HTTP method, but most HTTP servers understand HEAD to get only header information and POST to send data to servers. HTTP version always takes the form “HTTP/x.x”, uppercase.

The initial response line called status line, also has three parts separated by spaces: the HTTP version, a response status code that gives the result of the request, and a reason phrase describing the status code:

HTTP-version status-code

The status code is a three digit integer, and the first digit identifies the general category of response:

  • 1xx indicates an informational message only
  • 2xx indicates success of some kind
  • 3xx redirects the client to another URL
  • 4xx indicates an error on the client’s part
  • 5xx indicates an error on the server’s parts

Like many protocols, HTTP is constantly evolving. HTTP/1.1 has been defined and somewhere implemented (Jigsaw, Apache1.2b7). Improvements include:

  • Faster response, by allowing multiple transactions to take place over a single TCP-Connection (persistent connection and pipelining)
  • Faster response and great bandwidth savings, by adding cache support and chunked encoding, which allows a response to be sent before its total length is known
  • Efficient use of IP addresses, multiple different servers can be run on the same machine

For further reading i recommend you to visit The World Wide Web Consortium homepage which contains links to HTML, URL and HTTP specifications, news, updates, drafts and reports ( http://www.w3.org).

 

 

 

HTTP version 1.0 Connections


How to use the applet
 

The Applet specifically implements HTTP 1.0. It executes the command GET.  The window, that opens after the start, is divided  into four areas: 

  • WWW document Source code (HTML-File)  :
    In this part-window, the HTML-Code is shown. It is transfered from the server to the client machine. this code will be then interpreted by the browser. 
  • Data transfer in the network  :
    This part-window comprises three buttons to the control of the simulation, two pictures to present the client and the server, a Pakettanimation, to the representation the data transfer and a Scrollbar to the regulation of the animation-speed
  • Actual Browser Display  
    After the Browser has read the HTML-Code and has processed. It points the user the demanded side to the screen.
  • Client-Server History  
    The temporal sequence of the information-exchange between servers and Client is represented as arrows

 


Executing the applet
 

To start the simulation, please press the START button. you can stop the simulation in that you cliclk on the STOP button (picture). Anytime, one can start the simulation again through pressing the RESET button.

 

 

 

 

After starting the simulation, following steps take place:

  • TCP-Connection is opened
  • Document is transferred
  • HTML-Code appears in the Document Source window  and
  • TCP-Connection is closed .
 

 

 

 

 

The Browser recognizes that the side is not completely downloaded. Because of the HTML-code

 <img src=/images/myself.jpg width=100height=50>

It requests the new document (image) from the server. Consequently, a new  TCP-connection will be established.