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.
What is a cookie?
A small piece of data that is returned as part of the HTTP response header.
How do cookies work?
The browser stores the cookie sent by the server, and every time the browser sends a request to the server, the cookie is in the request header. They allow login
information, preferences and user habits to be saved onto the browser.
What is the traditional email setup?
Classic two-tier client server application using SMTP (Simple mail transfer protocol) to send a message to the mail server, which forwards the message to the receivers’ mail server. The receiver accesses their message using POP (post office protocol) or IMAP (Internet Mail access protocol)
Why do we use different protocols to send and receive emails?
Servers are available 24/7 whilst clients are not, and also users may want to access their emails from different clients like phones or a separate computer. IMAP and POP allow emails to be pulled on demand, instead of SMTP continuously pushing to an unavailable client.
What is the difference between POP and IMAP?
POP downloads messages onto the client and deletes them from the server
IMAP means that the messages stay on the sever, which allows simultaneous access to the email account at the same time from multiple clients making changes at the same time
What is the MIME format?
The Multi-Purpose Internet Mail Extensions is a way of encoding( and decoding) binary data into plain text, and specifying how emails with multiple documents are sent
Explain how web mail services work
The user is using a browser to compose an email, and as they send the email, a HTTP POST request is sent to the web server. The web server starts an SMTP session to deliver the email with the traditional mail service (client-server)