For a list of protocols that support asynchronous communication, see Protocol Support for 64-bit Recording, Async, and IPv6.
Originally, web applications communicated using conversations that had a synchronous nature. A typical synchronous conversation includes the following steps:
- The user interacts with an application that is presented in a web browser.
- Based on the user input, the browser submits a request to the web server.
- The server sends a response to the request, and the application in the browser is updated.
Synchronous applications have a number of limitations. One limitation involves the updating of the data that is displayed in the application inside the browser. For example, consider an application that displays stock prices of a number of shares. Ideally, the application should be able to update the display of the stock prices as soon as the prices are updated on the web-server. A synchronous application would be able to update the prices on a fixed time interval.
Example: Every 10 seconds, the browser could sent a request to the server for the most up-to-date stock prices.
One limitation of this solution is that the displayed stock prices may be out-of-date for a period of time before the refresh interval is reached. Although this may not be critical in our share portfolio scenario, the scenario illustrates the limitation of a synchronous application to timeously update information.
Where necessary, synchronous applications are being replaced with what are known as asynchronous applications. Asynchronous applications enable a client to be notified whenever an event occurs on the server side. Asynchronous applications are therefore better able to update information as required.
To enable asynchronous behavior, asynchronous communication occurs in parallel (simultaneously) with the main, synchronous flow of the business processes. This behavior makes asynchronous applications harder to accurately emulate using traditional synchronous Vuser scripts.
Although there are numerous types of asynchronous applications, there are three primary types: push, poll, and long-poll. For details, see Asynchronous Communication Types - Request and Response Sequences.
- For an introduction to using asynchronous communication in Vuser scripts, see VuGen Support for Asynchronous Communication.