Understanding Synchronous and Asynchronous Communication

In traditional Web-based applications, a user input triggers a number of resource requests. Once the requests have been answered by the server, no further communication takes place until the user's next input. Such communication between client and server is known as synchronous communication.

Here is an example of traditional synchronous communication passing between a browser and a Web server:

  1. The user clicks a UI control in a browser-based web application.
  2. The browser converts the user's action into one or more HTTP requests and passes them along to the Web-application server.
  3. The application server responds to the user's requests by returning the requested data to the user. At this point the application is updated and the synchronous communication loop is complete. A new synchronous communication loop will begin when the user next clicks a UI control in their browser.

Synchronous communication is limited due to the lapses in application updates that are presented to the user at regular intervals. Even if a synchronous application is designed so that it automatically refreshes information from the application server at regular intervals (for example, every 12 seconds), there will still be consistent periods of delay between data refreshes. For many applications, such update delays don't present an issue because the data they manage don't change often. Some application types however, for example stock-trading applications, rely on continuously updated information to provide optimum functionality and usability to their users.

Web 2.0 web-based applications address this issue by relying on asynchronous communication. Asynchronous applications deliver continuously updated application data to users. This is achieved by separating client requests from application updates. Multiple asynchronous communications between client and server may occur simultaneously or in parallel with one another.

While asynchronous communication delivers tremendous value to users, it presents a serious challenge to software-testing tool vendors who have difficulty emulating it with traditional test scripts.