Wednesday, March 10, 2010

“A” for Asynchronous!

For most parts, our software industry is driven by buzzwords. It becomes difficult to tell your Director or Manager – “I understand that it is very cool but it probably is not the best fit for our application.” Especially after he just attended a meeting where other of his designation/role have been repeatedly using that buzzword and flaunting how they have implemented it in their applications.

“Asynchronous call” is one of them. Although this mechanism existed for long, it caught on to all the levels with Ajax gaining popularity in last few years and now almost a standard.
What’s driving me to write this bog is the misunderstanding of the mechanism among some, including usage of ‘asynchronous call’ and Ajax synonymously at the wrong places.

We’ll try to understand what exactly asynchronous call means in terms of application development through the analogy below:

Getting an insurance quote:

Let’s imagine you need to call your insurance agent and get a quote. The agent will take some information, look up some data based on your information and do some calculation before giving you the quote. This process of getting the quote will take 15 minutes.
Your cell phone’s battery is out and all the phone access you have is a public phone. So, you give him a call form the public phone booth, give him your information and wait for 15 minutes and get the quote.
Great, you got the quote! But, you could have utilized those 15 minutes doing something else that you needed to do.

Getting an insurance quote asynchronously:

The requirement above and its premise remains the same. Except for, this time you have a cell phone or some home/office desk phone, where you can be reached.
So you call your agent, give him the information and give him your call back number requesting him to call you back with the quote.
You utilize next 15 minutes doing those other things that you needed to and get your quote.


The two important parts of the mechanisms are:

  • A Client capable of providing a cal back address.
  • A Server that is callable of calling back.

No comments:

Post a Comment