♣ Request models are two types
1. Synchronous Request Model
2. Asynchronous Request Model
♣ Till now we are developing web applications by using ASP.net synchronous request model. ASP.Net web applications are called as classic web applications
♣ These web applications will follow synchronous request model
Synchronous Request Model :
♣ In synchronous request model every client request has to process by server, due to that reason user idle time is increasing.
Diagram for Synchronous Request Model :
Step 1 :
♣ Client is preparing 1st request
Step 2 :
♣ Client is sending the first request to server
Step 3 :
♣ Server is receiving the first request
Step 4 :
♣ Server is processing the first request
Step 5 :
♣ While processing the request client is waiting for the response, which is called as “ user idle time”.
Step 6 :
♣ Server is sending the response to client
Step 7 :
♣ Client is receiving the response from server
Step 8 :
♣ Once client is received the response from server then client will prepare the second request.
_________________________________________________________________________________
♣ In this request model every request is processing by the server due to that reason we have following drawbacks
1. User Idle Time is increasing
2. Network traffic is increasing
3. Burden on server is increasing
♣ To overcome the drawbacks we can go for “ Asynchronous Request Model”
Asynchronous Request Model :
♣ In asynchronous request model between client and server we will have a mediator called “AJAX ENGINE”, will process the part of the request.
Diagram for Asynchronous Request Model :
Step 1 :
♣ Client is preparing first request
Step 2 :
♣ Client is sending the first request
Step 3 :
♣ Ajax engine will receive the request
Step 4 :
♣ Ajax engine is processing the part of the request and sending the remain part of the request to server
Step 5 :
♣ Server is receiving the remaining request
Step 6 :
♣ While processing the part of the request by AJAX engine client is waiting for the response, which is called as user idle time
Step 7 :
♣ Server is processing the remaining request
Step 8 :
♣ Once AJAX engine completed the part of the request it will send the response to client
Step 9 :
♣ Client is receiving the response from AJAX engine
Step 10 :
♣ Once client received the response from AJAX engine, client is preparing second request
Step 11 :
♣ Once server completed the remaining request processing, server will send the response to client
Step 12 :
♣ Client is receiving the response from server
Step 13 :
♣ Client is sending the second request
_________________________________________________________________________________
♣ In asynchronous request model part of the request is processing by AJAX engine, due to that reason which is reducing user idle time, which is reducing the burden on webserver and which is reducing the network traffic , finally asynchronous request model will improve the performance of the web application
♣ If you want to follow asynchronous request model while developing the web application we have to use AJAX
♣ AJAX is a latest web technology which will follow asynchronous request model
♣ To improve the performance of web application we can use AJAX.