OpenTP1 Version 7 Description

[Contents][Glossary][Index][Back][Next]

4.4.3 IST service (TP1/Shared Table Access)

The IST service allows information from all nodes in a group to be shared among the nodes and to be accessed from any node in the group. The information is stored in special tables called internode shared tables (ISTs). The IST service stores internode shared tables in shared memory, and enables UAPs to reference and update the tables without knowing the actual physical locations of the information that makes up the tables.

To use internode shared tables, TP1/Shared Table Access must be installed on each node.

As an example of how internode shared tables can be used, you could place job-status information from various nodes into internode shared tables. This would allow you to check the job status of all nodes from any node. This shared access to job-status information simplifies the management of jobs.

Figure 4-21 illustrates the configuration of the IST service.

Figure 4-21 IST service configuration

[Figure]

To use the IST service, make sure that all the nodes have the same IST table definition.

In Figure 4-21, different table names are specified in the IST table definitions of nodes A, B, and C. Thus, nodes A and B continue to output the KFCA25533-W message periodically until OpenTP1 terminates. This message notifies you that invalid table information was received.

The IST service is not recommended, however, for the following cases when distributing data to multiple nodes:

Organization of this subsection
(1) Access environment for internode shared tables
(2) Structure of an internode shared table
(3) Accessing an internode shared table
(4) Example of using the IST service
(5) Notes about using the IST service

(1) Access environment for internode shared tables

Internode shared tables exist in memory shared by each node. No actual file, such as TAM, DAM, or ISAM, stores an internode shared table. UAPs can access internode shared tables during online processing only; the tables cannot be accessed offline.

(2) Structure of an internode shared table

An internode shared table consists of multiple records. When a UAP references or updates an internode shared table, the table data is accessed in units of records, and one request from a UAP can access one record or access multiple records.

(3) Accessing an internode shared table

For details on how to access an internode shared table from a UAP, see the OpenTP1 Programming Guide. Transaction functions cannot be used for commit or rollback operations when accessing an internode shared table.

An internode shared table is locked for each function called from the UAP. Access to an internode shared table is not monopolized during the period from input to changing of data, so no deadlock will occur even if multiple UAPs access one table.

(4) Example of using the IST service

Figure 4-22 shows an example of effective use of the IST service.

Figure 4-22 Example of effective use of the IST service

[Figure]

In Figure 4-22, only node A updates IST table A, and only node B updates IST table B. When data is updated at any node, the IST service reports and applies the change to other nodes. Thus, any node can reference up-to-date IST tables. This configuration is effective in that only one specific node can update a specific IST table.

For example, suppose that node A writes its status information to IST table A, and node B writes its status information to IST table B. In this case, if you create IST table C in which node C can write and update its status information, each node can reference the other nodes' status information. Note that there is a delay due to communication with other nodes for applying the change to their IST tables. Before the change is applied, other nodes reference the old information.

(5) Notes about using the IST service

When multiple nodes use the IST service, make sure that there is no time difference among the nodes. If there is a time difference, updates at a node might not be correctly applied to other nodes. The following figure illustrates how the IST service updates IST records (records in the IST tables) on multiple nodes.

Figure 4-23 How IST records are updated

[Figure]

  1. A user application program (UAP) creates an update of IST record 1, in IST table A on node A.
  2. The UAP acquires the current machine time at microsecond accuracy, and assigns the time to the record's update as a timestamp.
  3. OpenTP1 compares the assigned timestamp with the timestamp of the corresponding IST record in the shared memory on node A.
    If the timestamp of the record's update is newer, OpenTP1 updates the IST record in the shared memory. If the timestamp of the record's update is older, OpenTP1 does not update the IST record in the shared memory. The dc_ist_write function returns normally even when it does not update any IST records.
  4. If an IST record in the shared memory is updated, the IST service on node A notifies the IST service on node B that an IST record was updated on node A. At this time, the updated IST record and its timestamp are also reported.
  5. Upon reception of the updated IST record and its timestamp, the IST service on node B compares the timestamp of the received IST record with the timestamp of the corresponding IST record on node B.
  6. If the timestamp of the received IST record is newer, the corresponding IST record on node B is replaced with the received one.

As described above, the IST service uses the timestamp to decide whether to update the IST record. Note, however, the IST service may be unable to apply the latest data in the following cases: