calling multiple APIs in parallel
Question
Application Type
Mobile

Is there a way on Outsystems (mobile apps) that allows calling multiple APIs in parallel? we have a case where a single server needs to invoke multiple APIs asynchronously where the APIs are independent of each other, is that possible? and how? 

mvp_badge
MVP
Solution

Hi,

To use parallel processing in OutSystems you can use LBPT processing. Per front end server max 20 processes can run in parallel.

Each process could then call the API.

Regards,

Daniel


Dear Daniël Kuhlmann

Thanks for your response. is there any direct way to achieve this without using the Business Process Technology? 


Hi Kawthar,

Without using BPT below are the other ways

If you want to call multiple API from server side parallel you can use below forge component it uses .net threading to make parallel requests but in these case you would loose some REST API logging and other features

https://www.outsystems.com/forge/component-overview/2375/parallel-processing

and if you want to call parallel request from client side then you can create a separate DataAction for each API and they will call the  API from them. DataAction runs asynchronously 

Best Regards

Devendra

Thanks, Devendra Singh Baghel for your response.

For the part related to the client-side, we should fetch the data as on "in start" in order to let the actions run asynchronously right? 

I think if we want them "on-demand" they will not run in parallel, and the order of running them will depend on the order of refreshing them from the client-side.

Please confirm. 

Hi Kawthar,

Yes, you are correct!

If we Set the Fetch property of the Aggregate/DataAction to At start. This ensures that the app requests the data from the database when the Screen loads.

If we Set the Fetch property of the Aggregate/DataAction to Only on demand. With this setting, the Aggregate/DataAction queries the database only upon a request/Refresh data.

Thanks

Vinod


Yes correct. you can create a webblock and can use the dataactions to call the api asynchronously  and you can use that web block where ever you need those async api calls.

Best Regards

Devendra


mvp_badge
MVP
Solution

Hi,

To use parallel processing in OutSystems you can use LBPT processing. Per front end server max 20 processes can run in parallel.

Each process could then call the API.

Regards,

Daniel


Dear Daniël Kuhlmann

Thanks for your response. is there any direct way to achieve this without using the Business Process Technology? 


Hi Kawthar,

Without using BPT below are the other ways

If you want to call multiple API from server side parallel you can use below forge component it uses .net threading to make parallel requests but in these case you would loose some REST API logging and other features

https://www.outsystems.com/forge/component-overview/2375/parallel-processing

and if you want to call parallel request from client side then you can create a separate DataAction for each API and they will call the  API from them. DataAction runs asynchronously 

Best Regards

Devendra

Thanks, Devendra Singh Baghel for your response.

For the part related to the client-side, we should fetch the data as on "in start" in order to let the actions run asynchronously right? 

I think if we want them "on-demand" they will not run in parallel, and the order of running them will depend on the order of refreshing them from the client-side.

Please confirm. 

Hi Kawthar,

Yes, you are correct!

If we Set the Fetch property of the Aggregate/DataAction to At start. This ensures that the app requests the data from the database when the Screen loads.

If we Set the Fetch property of the Aggregate/DataAction to Only on demand. With this setting, the Aggregate/DataAction queries the database only upon a request/Refresh data.

Thanks

Vinod


Yes correct. you can create a webblock and can use the dataactions to call the api asynchronously  and you can use that web block where ever you need those async api calls.

Best Regards

Devendra


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.