Availability Guide for Application Design

Designing Applications for Change
Availability Guide for Application Design525637-004
10-16
Isolating Data From the Application
Updating the Interface Module
As a step towards continuous operation of the application, you must allow the old
version of the interface module to run concurrently with the new version.
You cannot simply overwrite the old version with the new. Currently executing or
suspended processes might be in the module code at the time you overwrite it. These
processes would be forced to switch to the new code part way through the module,
causing unpredictable results.
It is necessary for both versions of the module to coexist to allow processes that are
already executing the old module to continue to do so, while processes just entering
the module can call the new version. Changing the address of the module to that of the
new module is one way of achieving the desired effect. Assuming that the addressing
is indirect, this change can be performed without any change to the modules that call
the interface module as shown in Figure 10-2 on page 10-17. New calls then route to
the new module without interrupting processes that are currently executing in the old
module.
The old version of the interface must remain until all processes have exited the
module. How long this takes depends on the design of the application and on how it is
being used.
Figure 10-1. Isolating Data From the Application Through Data Encapsulation
01 Data Item1
01 Data Item2
02
Subitem1
.
.
.
.
.
.
Module 1
Module 2
Module 3
Module n
Data
Interface
Module
VST901.vdd