Availability Guide for Application Design
Designing Applications for Change
Availability Guide for Application Design—525637-004
10-17
Isolating Data From the Application
Changing the Data Layout
Changing the layout of global data without taking the application down involves:
•
Establishing how and when the data layout must change
•
Establishing how to control access to the data, given that the old and new interface
modules each expect a different data layout
One approach to changing the layout that is worth considering is to let the new
interface module make the change. This approach might be appropriate since the new
module is the only module that will subsequently access the data. By maintaining a
version number in each data structure, the new interface module can determine if a
change in layout is necessary.
Once the data layout is changed, processes using the old interface module can no
longer trust the data they receive because the old module has no knowledge of the
new data layout. A semaphore system or locking scheme on each data structure could
ensure that the old interface module is finished with accessing data before the new
module is allowed to change the layout.
Figure 10-2. Indirect Addressing Allows Multiple Versions of the Data-Interface
Module to Be Used Simultaneously
01 Data Item1
01 Data Item2
02
Subitem1
.
.
.
.
.
.
Module n+1
Module n+n
.
.
.
Module n
Module 1
Address of Data-Interface
Module
First contains the address of the
original version of the data-interface
module when called by Module 1
through Module n.
This address is updated to point to
the upgraded data-interface module
and then called by Module n+1
through Module n+n.
Data-Interface
Module
(Version n+1)
Data-
Interface
Module
(Version n)
VST902.vdd