Application Layer Flashcards
What are the most widely used concrete applications used on the Internet?
The World Wide Web and electronic mail
How does the Application Layer take full advantage of the virtualisation of the network?
All the different application structures are implemented on this layer. The application layer builds on top of all the other layers
URL
Uniform Resource Locator. Address of a document on the WWW. An image, webpage, audio file, a program, an app.
HTML
Hypertext Markup Language. The document format for web pages
HTTP
Hypertext Transfer Protocol. Standard set of commands understood by tall web browsers and servers. Browsers can sed a HTTP command to a server to request a certain doc . based on its URL and the same protocol will be used to send the document back
Three components of a URL
Scheme (http/https)
-What protocol must be used to retrieve the document
Host (monash.edu)
- Identifies the server
Path(/authentication/adfs)
- identifies particular document on the server
Explain the request-response cycle for http://www.monash.edu/FIT1047/
The browser first notices the scheme and opens a connection with the HTTP server www.monash.edu, then sending a request for the FIT1047 document. The server responds by sending the document until all assets have been loaded
Explain what this is:
GET /fit1047.html HTTP/1.1
Host: www.monash.edu
The HTTP request sent from the client to the server.
Explain what this is:
HTTP/1.0 200 OK Date: Fri, 21 Apr 2017 05:30:10 GMT Content-type: text/html Content-Length: 463 Last-Modified: Fri, 21 Apr 2017 04:39:52 GMT
This is the HTTP response sent back by the server. The browser will read what is in the HTML file and if there are images, another request is made to the server for the image. The cycle restarts until the entire page is rendered
Name 2 HTTP methods
GET
POST
HTTP request (structure)
Consists of request line.
- Method
- Path
- Protocol version used
Followed by request header.
-Host……. line is mandatory
other additional information as well like files of a certain language or types of files.
The request header needs to be followed by a blank line followed by the request body
HTTP response (structure)
The first line is the response status( protocol version and two status codes. 200 and OK or 404 Not found)
Followed by response header. Contains meta data(what type of document it is, last modified date.
Ends with a blank line followed by a response body
What is the state of HTTP?
HTTP is stateless, meaning that every request is sent independently and the server does not know if consecutive requests are form the same user or different users.
What is the problem with the state of HTTP?
If you’re shopping, you want the server to remember whether or not you put an item in the cart or not. You want the data saved and kept consistent within a session.
How does the server know information about a users session?
The information is kept somewhere else and is transmitted as part of requests and responses with a sessionID. The browser sends that sessionID as part of every single future request. The sessionIDs are embedded in the HTML file and the ID is sent as part of every request.