Posts

Showing posts from February 5, 2023

What does Asynchronous request handling mean

Let's try to answer the below two questions as part of this blog.  1) What is the difference between Asynchronous and Synchronous request handling? 2) What are the advantages of one over the other?  Lets us first understand what happens when we send a request to any website like amazon.com.  Step 1: Your request reaches the server via the network. Step 2: The server does something in the background and responds to your request with some data. Step 3: You will receive the response and see it in your browser.  If you observe carefully there is a time delay between steps 1 and 2 as the server needs to do something, the time taken is proportional to the complexity of the activity.  Based on how the server handles our request we can say if the process is asynchronous or synchronous.  Let us take an analogy of how we wait for service at banks. One way is we wait in a queue to withdraw our money OR receive a token and relax while we get a call once our money ...