Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part II Application Layer.

Similar presentations


Presentation on theme: "Part II Application Layer."— Presentation transcript:

1 Part II Application Layer

2 Web caches (proxy server)
client origin server client origin server Application Layer

3 More about Web caching why Web caching? Application Layer

4 If-modified-since: <date> If-modified-since: <date>
Conditional GET client server Goal: don’t send object if cache has up-to-date cached version HTTP request msg If-modified-since: <date> object not modified before <date> HTTP response HTTP/1.0 304 Not Modified HTTP request msg If-modified-since: <date> object modified after <date> HTTP response HTTP/ OK <data> Application Layer

5 HTTP Response response protocol but how can the server push updates to the client Example instant messages Does the client need to constantly resquest/ poll Do you have a message for me Answers full duplex websockets Application Layer

6 WebSocket's Full duplex communication
Allows the webserver to send content without first being requested Kind of new standardized in RFC 6455 in 2011 Application Layer

7 Request a socket GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Origin: Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version: 13 Application Layer

8 Servrer Response HTTP/ Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat dGhlIHNhbXBsZSBub25jZQ== + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" SHA1 Hash Base 64 encoding s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Application Layer

9 Subsequent Messages Don’t follow frames/packets don’t follow standard framing: There are 16 frame times 6 are use and 10 are reverse for the future. Binary Text etc Application Layer

10 JavaScript example of WebSocket
Application Layer

11 JavaScript webrequest
Application Layer

12 Chapter 2: outline 2.1 principles of network applications
app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP 2.8 socket programming with TCP Application Layer

13 FTP: the file transfer protocol
user interface client FTP server user at host remote file system local file system ftp: RFC ftp server: port 21 Application Layer

14 Application Layer

15 FTP: separate control, data connections
TCP control connection, server port 21 TCP data connection, server port 20 FTP client FTP server Application Layer

16 FTP commands, responses
sample commands: sample return codes Application Layer

17 Chapter 2: outline 2.1 principles of network applications
app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP 2.8 socket programming with TCP Application Layer

18 A Story: The Inventor of email
Still Alive Shiva Ayyadurai Application Layer

19 Electronic mail User Agent Three major components: outgoing
user mailbox outgoing message queue Three major components: User Agent mail server user agent Application Layer

20 Electronic mail: mail servers
mailbox message queue SMTP protocol user agent mail server user agent SMTP mail server user agent SMTP SMTP user agent mail server user agent user agent Application Layer

21 Electronic Mail: SMTP [RFC 2821]
1 ) 2) 3) 4) Application Layer

22 Scenario: Alice sends message to Bob
user agent user agent mail server mail server Alice’s mail server Bob’s mail server Application Layer

23 Sample SMTP interaction
S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 Sender ok C: RCPT TO: S: Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection Application Layer

24 SMTP: final words comparison with HTTP & FTP: Application Layer

25 Mail message format SMTP: header RFC 822: : header lines, e.g.,
different Body: header blank line body Application Layer

26 Mail access protocols SMTP: delivery/storage to receiver’s server
user agent SMTP SMTP user agent sender’s mail server (e.g., POP, IMAP) receiver’s mail server SMTP: delivery/storage to receiver’s server mail access protocol: retrieval from server POP: IMAP: HTTP: Application Layer

27 POP3 protocol authorization phase transaction phase, client: C: list
S: +OK POP3 server ready C: user bob S: +OK C: pass hungry S: +OK user successfully logged on authorization phase client commands: : . server responses transaction phase, client: C: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents> C: dele 1 C: retr 2 C: dele 2 C: quit S: +OK POP3 server signing off Application Layer

28 Application Layer Protocols IOT
MQTT: Message Queuing Telemetry Transport Application layer protocol implement ontop of TCP/IP Why not UDP Small footprint Andy Stanford-Clark First version of the protocol in 1999 (IBM) Application Layer

29 Why is MQTT interesting
This maybe one of the protocols that power the internet of things Amazon has added MQTT support AWS and freeRTOS Application Layer

30 How does MQTT work Topics
There is no need to configure a topic, publishing on it is enough. Topics are treated as a hierarchy Temperature/roof Application Layer


Download ppt "Part II Application Layer."

Similar presentations


Ads by Google