Orchestration vs individual call recommendation

Not applicable

For a displaying a particular data in UI, if it requires three API calls, Is it recommended to fire three calls from UI

(OR)

Is it recommended to fire single call from UI and do the orchestration in the Apigee Layer?

0 1 224
1 REPLY 1

Since these are all http GET invocations. It depends on your motivation for doing this.

And you are using the word orchestration as if orchestrations on the server are always linear(one API call after the other)

If your motivation is purely performance/latency, switch your server side orchestration to make concurrent downstream calls . In general (with a host of assumptions), the performance difference of making concurrent invocations from the server vs making them from the UI tends to be negligible and is generally not worth the increased complexity for UI developers

If your motivation is user experience, making the calls from the UI is a smart choice because it allows the User Experience designers/developers to define and handle API failure/unavailability. It also gives them the flexibility to mash up the data to create different experiences.

However, trying to do concurrency on the client side does impose complexity of error handling and failures.