Difference b/w Load

您所在的位置:网站首页 中华56个民族分布简介 Difference b/w Load

Difference b/w Load

2023-08-22 01:59| 来源: 网络整理| 查看: 265

Call-Async-Activity was introduced to allow asynchronous execution of activity, in parallel to main requestor, in a different java thread. Yes, the only use case supported currently is to load data pages asynchronously. When compared with Load-DataPage, the advantage you get is that you can group asynchronous load of related data pages.

For example: Suppose there are 3 data pages in an application D_CustomerSavingAccounts, D_CustomerLoanAccounts and D_CustomerSummary, and at some point all three of them are needed for processing some logic. D_CustomerSavingAccounts, D_CustomerLoanAccounts are independent of each other, but D_CustomerSummary requires some data from both D_CustomerSavingAccounts, D_CustomerLoanAccounts.

These data pages can be made available using Load-DataPage in following way: First queue both D_CustomerSavingAccounts, D_CustomerLoanAccounts for asynchronous load and wait till they are available. Then queue D_CustomerSummary for asynchronous load and wait till it is available. Then the logic which requires these three data pages can be run.

So, using Load-DataPage the main requestor has to wait twice.

Instead, if the logic of loading these data pages is moved to an asynchronous activity. Then just queue the activity for asynchronous load and wait for it to complete. Then the logic which requires these three data pages can be run.

Show More

Call-Async-Activity was introduced to allow asynchronous execution of activity, in parallel to main requestor, in a different java thread. Yes, the only use case supported currently is to load data pages asynchronously. When compared with Load-DataPage, the advantage you get is that you can group asynchronous load of related data pages.

For example: Suppose there are 3 data pages in an application D_CustomerSavingAccounts, D_CustomerLoanAccounts and D_CustomerSummary, and at some point all three of them are needed for processing some logic. D_CustomerSavingAccounts, D_CustomerLoanAccounts are independent of each other, but D_CustomerSummary requires some data from both D_CustomerSavingAccounts, D_CustomerLoanAccounts.

These data pages can be made available using Load-DataPage in following way: First queue both D_CustomerSavingAccounts, D_CustomerLoanAccounts for asynchronous load and wait till they are available. Then queue D_CustomerSummary for asynchronous load and wait till it is available. Then the logic which requires these three data pages can be run.

So, using Load-DataPage the main requestor has to wait twice.

Instead, if the logic of loading these data pages is moved to an asynchronous activity. Then just queue the activity for asynchronous load and wait for it to complete. Then the logic which requires these three data pages can be run.

This way main requestor will wait only once.

Also, asynchronous activity provides reuse of logic for loading these data pages. For example, if these data pages are required in another activity, then with asynchronous activity just one queue and wait is sufficient, but with Load-DataPage multiple queue and wait have to be used and order has to be maintained.

Show Less


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3