Atlas 3: Atlas batch calls are not always faster

Wow excellent article by Omar Al Zabir!

Atlas provides you batch call feature which combines multiple web service calls into one call. It works transparently, you won't notice anything nor do you need not write any special code. Once you turn on the Batch feature, all web service calls made within a duration gets batched into one call. Thus saves roundtrip time and total response time.

The actual response time might be reduced but the perceived delay is higher. If 3 web service calls are batched, the 1st call does not finish first. All 3 calls finish at the same time. If you are doing some UI updates upon completion of each WS calls, it does not happen one by one. All of the calls complete in one shot and then the UI gets updated in one shot. As a result, you do not see incremental updates on the UI, instead a long delay before the UI updates. If any of the call, say the 3rd call downloads a lot of data, user sees nothing happening until all 3 calls complete. So, the duration of the 1st call becomes nearly the duration of the sum of all 3 calls. Although actual total duration is reduced, but the perceived duration is higher. Batch calls are handy when each call is transmitting small amount of data. Thus 3 small calls gets executed in one roundtrip.

Let's work on a scenario where 3 calls are made one by one. Here's how the calls actually get executed.

Read more...

 

No Comments