Application Layer II Flashcards

To understand: • Web services and HTTP • The electronic mail

1
Q

Web and HTTP

A
  • Hypertext Transfer Protocol (HTTP), web’s application layer
    protocol, defined in [v1.0-RFC 1945] and [v1.1-RFC 2616]
    and uses port 80.
  • A web page consists of objects (e.g. HTML file, JPEG image,
    Java applet, audio file, …).
  • The base HTML-file includes several referenced objects,
    each object is addressable by a URL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

HTTP overview

A
  • HTTP is a client/server protocol.
    • The client - typically a browser -
      requests, receives
      and “displays” Web objects.
    • The web server sends objects in
      response to
      requests. The HTTP server is
      stateless.
  • HTTP uses TCP as its underlying transport
    protocol.
  • The HTTP client first initiates a TCP connection
    with the server.
  • Once the connection is established, the browser
    and the server processes access TCP through their
    socket interfaces.
  • The client sends HTTP request messages and
    receives HTTP response messages.
  • The server receives request messages and sends
    response messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTTP connections

A
  • Non-persistent HTTP
  • Persistent HTTP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • Non-persistent HTTP
A
  • At most one object is sent over a TCP connection and then
    the connection is closed.
  • Requires multiple connections to download multiple
    objects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • Persistent HTTP
A
  • Multiple objects can be sent over single TCP connection.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Persistent HTTP

A
  • The server leaves the connection open after sending the
    response message.
  • Subsequent HTTP messages between the same client/server
    are sent over the open connection.
  • The client sends requests as soon as it encounters a
    referenced object.
  • It can take as little as one RTT for all the referenced objects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

User-server state: cookie

A
  • Recall: an HTTP server is stateless.
  • But often it is useful that the server keeps session state
    information (e.g. identify users to restrict user access or
    serve content as a function of the user identity).
  • HTTP uses cookies for this purpose
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An HTTP cookie has four components:

A
  1. a cookie header line in the HTTP response message;
  2. a cookie header line in the HTTP request message;
  3. a cookie file kept on the user’s end system and managed by the
    user’s browser; and
  4. a back-end database at the Web site.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Web caches (proxy server)

A
  • A web cache satisfies HTTP requests on behalf of an origin
    Web server. It is both a client (to the original server) and a
    server (to the client).
  • Web caching reduces response time and network traffic
    (access link to the Internet).
  • A web cache stores a copy of a requested object in its local
    storage and sends a copy to the client browser.
  • To avoid stale data, HTTP uses conditional GET manifested
    by the If-Modified-Since: and Last-Modified: header
    lines.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The electronic mail

A

The e-mail has three major
components:
* User agents
* Mail servers
* Simple Mail Transfer Protocol (SMTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • User agents
A
  • User agents compose, edit, read and save
    (outgoing, incoming messages stored on
    server) mail messages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • Mail servers
A
  • Mail servers have a mailbox (incoming
    messages), a message queue (outgoing
    messages) and an SMTP implementation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Simple Mail Transfer Protocol (SMTP)

A

protocol between mail servers to send email
messages
* Client: sending email messages
* Server: receiving email messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Simple Mail Transfer Protocol

A
  • SMTP uses TCP for reliable e-mail transfer and port 25.
  • Normally the sending server connects directly to the
    receiving server (direct transfer).
  • SMTP has three phases of transfer:
  • handshaking (greeting)
  • transfer of messages
  • closure
  • Command/Response interaction
  • commands: ASCII text
  • response: status code and phrase
  • Messages must be in 7-bit ASCII
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Mail message format

A
  • Mail message format
  • Header lines, e.g.
  • To:
  • From:
  • Subject:
    different from SMTP MAIL FROM, RCPT TO: commands!
  • Body: the “message” separated by a bank line (CRLF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Mail access protocols

A
  • SMTP is a push protocol.
  • Mail access protocols
  • Post Office Protocol version 3 (POP3
  • Internet Mail Access Protocol (IMAP)
  • HTTP
17
Q

SMTP

A

SMTP is a push protocol. The receiver user agent cannot request to
obtain emails from the receiver’s server using SMPT. Obtaining the
messages is a pull operation

18
Q
  • Mail access protocols
A

transfer messages from the receiver’s mail server
to the recipient’s user agent

19
Q
  • Post Office Protocol version 3 (POP3
A

POP3 has three phase:
* Authorisation: the user agent sends a username and a password.
* Transaction: the user agent retrieves messages; can mark messages for
deletion, remove deletion marks, and obtain mail statistics.
* Update: after the client has issued the quit command (ending the POP3
session); the mail server deletes the messages that were marked for
deletion.

20
Q
  • Internet Mail Access Protocol (IMAP)
A

more features, including
manipulation of stored messages on server

21
Q

HTTP

A

gmail, Hotmail, Yahoo, etc