3.2 Definition of a Fallback Strategy
System-dependent errors can occur during the program runtime when a network is used, which is not the case in local applications. As a consequence of such errors, not all functions necessary for the application may be useable since other hosts or the network have failed. In distributed applications, such errors can be recognized and at least partially be avoided or remedied. There are various possibilities of reacting to errors:
- Dynamically change the host name or program name to the name of a host or program that can be accessed during runtime. Then restart the relevant application parts.
- Start or link application parts locally, which can be achieved by setting the attribute .local to true. This method only makes sense if the local application contains the necessary function calls, but does not use them in a normal situation because of performance considerations. If an application is started locally, the corresponding start rule on <application> start is executed. The function that transfers the locally provided functions to the DM can be called in this start rule. Then proceed as usual.
Example
In the example list, variant b is to be used, i.e. local linking. The start rule is changed so that the local application is switched to local if starting the remote application does not succeed. The names of the now locally available functions are transferred to the DM with the additional function InitTestAppl
. The function is called in the start rule of the application: on TestAppl start.
Those are all necessary changes to the dialog file. Additional changes are necessary in the application source code.