balkje gen website
Bekijk de website in Nederlands.

Modeling tip 2: 'Why and when use Asynchronous statements?'


Why use Asynchronous Statements?
Do you experience bad performance when calling more than one server while the problem is not caused by bad coding of READ statements?

What is the problem when calling two servers?


The traditional approach to call data from two servers is:


An important feature of this way of programming is that the statement USE server_2 has to wait until USE server_1 has been executed. This approach of calling data from two servers might cause unsufficient performance.

 

Improvement of the performance may be achieved by using the CA Gen facility of the asynchronous communication. This way of calling servers implies that after a first call of server_1 the action diagram will not wait until an answer will come from the server_1, but it will continue with the next statement. Server_2 will be called regardless USE server_1 is finished or not.

The server procedure will not require a change.

 

When use Asynchronous Communication?

The asynchronous USE statements allow you to execute in parallel procedures on more than one server. After executing a USE ASYNC statement the logic of the action diagram will continue with the next statement. You do not have to wait until the action is finished and an answer is received from the first server.

 

This ASYNC approach is especially valuable in case there are data retrievals which take much time to fulfil. The user of the application may continue with other aspects while the data are being retrieved.

 

----------------------------------------------------------------------------------------------------------------------
From the 'Asynchronous Communication' guide by Rony van Hove. Download here the complete document.

 

Courses


© Educagen | disclaimer | info@educagen.com |

Gen also known as: CA Gen, AllFusion Gen, Advantage Gen, coolgen, IEF and Composer.

Cool:gen contact