Download presentation
Presentation is loading. Please wait.
1
Application Layer Part 1
Daniel Graham PhD
2
Application Layer Our Goals:
3
Examples of Application Layer
4
Creating a network App application transport network data link
physical application transport network data link physical application transport network data link physical
5
Application Architectures
6
Client Server Architecture
7
Pure P2P Architectures peer-peer
8
Hybrid client-server/P2P
9
Process Communication
application application controlled by app developer process process transport transport network controlled by OS network link Internet link physical physical Application Layer
10
Process Communication
11
Address Processing
12
Application Layer Protocol Define
13
Transport service requirements: common apps
application file transfer Web documents real-time audio/video data loss no loss loss-tolerant throughput elastic audio: 5kbps-1Mbps video:10kbps-5Mbps time sensitive no yes, 100’s msec Application Layer
14
Web and HTTP www.someschool.edu/someDept/pic.gif path name host name
Application Layer
15
HTTP overview PC running Firefox browser server running Apache Web
iphone running Safari browser Application Layer
16
HTTP overview (continued)
Application Layer
17
HTTP connections Application Layer
18
Nonpersistent HTTP suppose user enters URL: time
time Application Layer
19
Non-persistent HTTP: response time
Application Layer
20
Persistent HTTP non-persistent HTTP issues: persistent HTTP:
21
HTTP request message GET /index.html HTTP/1.1\r\n
Host: www-net.cs.umass.edu\r\n User-Agent: Firefox/3.6.10\r\n Accept: text/html,application/xhtml+xml\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO ,utf-8;q=0.7\r\n Keep-Alive: 115\r\n Connection: keep-alive\r\n \r\n
22
HTTP request message: general format
method sp URL sp version cr lf cr lf value header field name ~ ~ cr lf value header field name cr lf ~ entity body ~ Application Layer
23
Uploading form input Application Layer
24
Method types HTTP/1.0: HTTP/1.1: Application Layer
25
HTTP response message HTTP/1.1 200 OK\r\n
Date: Sun, 26 Sep :09:20 GMT\r\n Server: Apache/ (CentOS)\r\n Last-Modified: Tue, 30 Oct :00:02 GMT\r\n ETag: "17dc6-a5c-bf716880"\r\n Accept-Ranges: bytes\r\n Content-Length: 2652\r\n Keep-Alive: timeout=10, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO \r\n \r\n data data data data data ... Application Layer
26
HTTP response status codes
200 OK 301 Moved Permanently 400 Bad Request 404 Not Found 505 HTTP Version Not Supported
27
Trying out HTTP (client side) for yourself
1. Telnet to your favorite Web server: For Macs you will have to brew install telnet telnet 80 2. type in a GET HTTP request: GET /~dgg6b/ HTTP/1.1 Host: 3. look at response message sent by HTTP server! (or use Wireshark to look at captured HTTP request/response)
28
User-server state: cookies
example: many Web sites use cookies four components: Application Layer
29
Cookies: keeping “state” (cont.)
client server ebay 8734 Amazon server creates ID 1678 for user create entry cookie file ebay 8734 amazon 1678 backend database cookie- specific action access cookie- specific action access one week later: ebay 8734 amazon 1678
30
Cookies (continued) what cookies can be used for: how to keep “state”:
aside what cookies can be used for: cookies and privacy: cookies permit sites to learn a lot about you how to keep “state”: Application Layer
31
Lets Build a webserver Live coding
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.