Synchronous Processing vs Asynchronous Processing
Any synchronous processing will block the caller until the processing is completed. From performance point of view, asynchronous processing clearly helps; the caller does not wait for any sub-process to complete, resulting in faster response.For example, in an order management system, provisioning of an order to various subsystems (shipping, billing, inventory, etc.) is an expensive task. If the order is arriving from a web store, asynchronous processing of these tasks will result in faster response to the end user or customer.
From scalability point of view, the same amount of cpu and memory resources is required whether the processing is synchronous or asynchronous. So at first glance, there doesn't seem to be advantage with asynchronous processing. But in fact some clever techniques can be used to help with scalability:
- Asynchronous processing could be scheduled during the time of the day when load of the system is less, say late in the night, to take advantage of idle resources
- If possible, some processing could be batched together, which would not have been possible with synchronous processing
MVC Framework vs RIA Framework
In a pure MVC-based architecture, all processing is delegated to the application server (middle-tier). The browser simply displays html sent by the server and sends user input in html forms and hyperlink clicks to the server. Any mouse click on the UI requires a server roundtrip.In case of RIA (Rich Internet Application), the browser is a smart client, and runs a program, which could be a JavaScript application or Flash-based application. The browser communicates with the server only to send and receive data, but for many other actions, the browser does not need to communicate with the server at all.
For example, to open a tree node, in case of MVC, the browser communicates with the server which must send the entire html page to the browser, with the tree node opened. In case of RIA, if the data for the child nodes is already available on the browser, the server is not contacted at all. If the data is not available only that data is fetched from the server, and not the entire html page.
Thus, RIA takes scalability to an entirely new level, because each client machine lends resources to the overall scalability of the system. The system's resources are not restricted to the resources of the servers alone.
No comments:
Post a Comment