The Web-APIs are an atomic unit of transaction. This means that your client will receive the data after the server application has completed the entire processing and handed the results over to your runtime framework for rendering.
This meets the requirements of most day-to-day applications, but not all. Take a travel site for instance, in order to respond to a user’s search request, your application has to collect data from your cache, your local inventory and combine it with the data from your search partners – and there could be many inventory suppliers. This means that the conventional API approach, when applied to this problem, will make your user wait until the slowest of your partner APIs have responded.
An ideal user experience would be – and you would find this on all top travel portals – that your user gets the results as they become available. It could also mean that certain results could change or update themselves while in user’s view. E.g. you may display static information about the destination immediately (it is usually available on file), and update the dynamic availability information after a slight delay.
This requires a completely different design approach. If you have already implemented your application using a conventional API approach and want to change, this would require a major redesign of your application.
This brings me to the latest ZOAPIIO innovation in programmer convenience and productivity – detached services. ZOAPIIO now allows you to run any Web-Service in a detached mode. The processing is initiated and the control is returned to the caller immediately with a identifier. The caller can use that identifier and make subsequent API calls and connect to the data space of the same detached service. Subsequent API calls can poll and peek into the result set and extract incremental changes and display live to the user.
This lets you achieve a quantum jump in user experience with minimal engineering effort.
Author: Manoj Agarwal, Chief Architect – ZOAPIIO.
Do not forget to visit the website: https://zoapiio.com.