Hooman nili - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Hooman nili

Description:

HTTP Request (Give us picture 1) HTTP Response (Here is picture 1) 6. 5 ... Requests is issued with a POST URI - Response comes back with a status code (e.g. 200 OK) ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 29
Provided by: clintea
Category:
Tags: hooman | nili | pic | post

less

Transcript and Presenter's Notes

Title: Hooman nili


1
The WWW Part 3 How Clients Severs work
together via HTTP
Hooman nili
2
HTTP Message Construction - Simplified
Browser
Application (HTTP)

HTTP Message
Transport (TCP)
TCP Segment
Internet (IP)
IP Datagram
Network Technology
?
Network (The Internet)
Network-ready packet/datagram
3
How Client and Server work together
  • Initiating (starting )Communication
  • The three-way handshake Connections
  • Persistence
  • Pipelining

4
1. Initiating Communication
1
Request
Response
2
5
2. The three-way (3W) handshake
1
TCP SYN (Hello, Im a client. Can I ask for
something?)
TCP SYN-ACK (Hello, Im a Server. Sure, Go ahead)
2
3
TCP ACK (OK, Thank you!)
4
HTTP Request (Give us this file. Will you.)
HTTP Response (Here you are.)
5
TCP FIN (Finished that request)
6
7
TCP FIN-ACK (OK, Im finished with that req. too)
6
2. The three-way (3W) handshake
1 TCP SYN 2 TCP SYN-ACK 3 TCP ACK TCP
connection is ESTABLISHED.
7
2. The three-way (3W) handshake
TCP SYN TCP Synchronise flag TCP SYN-ACK TCP
Synchronise and Acknowledge flag TCP ACK TCP
Acknowledge flag TCP FIN TCP Finished flag TCP
FIN-ACK TCP Finished and Acknowledge flag
8
3. Persistence
A client can issue more than one HTTP request
over the same TCP connection (Newer version of
HTTP i.e. HTTP 1.1). Persistence improves web
servers efficiency and performance. Even with
persistence the client still has to send a
request for each object (aka item, or resource).
9
3. Persistence
10
3. PersistenceMany reqs same TCP con.
1
TCP SYN
TCP SYN-ACK
2
3
TCP ACK
4
HTTP Request (Give us that web page)
HTTP Response (Here you are.)
5
6
HTTP Request (Give us this image)
HTTP Response (Here you are.)
7
TCP FIN (Finished that request)
8
9
TCP FIN-ACK (OK, Im finished with that req. too)
11
3. PersistenceA Mutual effort
Persistence depends on both the client and the
server. The client first decides whether to
request more than one item persistently. The
server, in turn, must first support persistence
connections and be kind enough not close the
TCP connection until all the clients requests
are responded to. NB Web servers like Apache can
be configured to limit the number of requests per
connection.
12
4. Pipelining
Pipelining is a feature of HTTP that allows the
client to issue consecutive requests without
having to wait for a response to each
request. Pipelining is facilitated by
persistence and together, these two features of
HTTP can improve performance noticeably. Like
persistence, pipelining requires cooperation from
both the client and the server.
13
4. PipeliningMany reqs in the pipeline
14
4. Pipelining - Example
A web page with 50 items and a server latency of
500 ms takes around 25 seconds to load
completely. If both persistence and pipelining
are used, the same page would typically load in
7 seconds i.e. we can improve performance by a
factor of 4. Terms Conditions apply.
Figures for illustration only! Subject to
availability. 56K modem, Users must know the
basics.
15
4. Pipelining Why should I care?
Im a web designer. Why do I need to know about
all this stuff? Surely, the server will do
everything. I just design the sites!
16
HTTP Four Basic User Operations
  • GET
  • POST
  • PUT
  • DELETE

17
HTTP Four Basic User Operations 1. GET
  • Used for resource retrieval
  • Its a simple 2-way exchange- Request is
    issued with a GET URI- Response comes back with
    a status code (e.g. 200 OK). The server includes
    the object itself in the response.

18
1. GET
1
Request GET URL
Response 200 OK resource
2
19
HTTP Four Basic User Operations 2. POST
  • Used for sending info to server e.g. forms
  • Its a simple 2-way exchange- Requests is
    issued with a POST URI- Response comes back with
    a status code (e.g. 200 OK)

20
1. POST
1
Request POST URI
Response 200 OK resource
2
21
Confused.com!
  • What is difference between GET and POST?

22
HTTP Four Basic User Operations 3. PUT
  • Used for sending info to server e.g. file
    upload
  • Its a simple 2-way exchange- Requests is
    issued with a PUT URI- Response comes back with
    a status code (e.g. 200 OK)

23
3. PUT
1
Request PUT URI
Response 200 OK resource
2
24
Confused!
  • What is difference between POST and PUT?

25
3. PUT Example Web-based file upload
26
HTTP Four Basic User Operations 4. DELETE
  • Allows client to remove a resource on server e.g.
    file deletion
  • Its a simple 2-way exchange- Requests is
    issued with a PUT URI- Response comes back with
    a status code (e.g. 200 OK)

27
4. DELETE
1
Request DELETE URI
Response 200 OK resource
2
28
4. DELETE Example Web-based file manager
Write a Comment
User Comments (0)
About PowerShow.com