9-18 IBM Informix OnLine Database Server Administrator’s Guide
Sharing Data by Using IBM Informix STAR
In the transaction shown inFigure 9-2,IBM Informix STAR must ensure that
all three OnLine database servers implement the same action, either to
commit the transaction or to roll back the transaction. This requirement of
atomicitymust be enforced even if a failure occurs at any host machine. If any
OnLine database server (italy,france, oraustralia) is unable to commit its
portion of the transaction, this inability must be communicated to a central
coordinator, andall OnLine servers participating in the transaction must be
prevented from committing their work. To manage this complex series of
communications,IBM Informix STAR uses a special protocol that coordinates
work performed at multiple database servers on behalf of a single trans-
action.The name of the protocol used to accomplish this is two-phase commit.
(Thetwo-phase commit protocol is described in detail starting on page 9-19.)
Multiserver Modification Concepts
Toexecute the example code shown in Figure 9-2, the current server process
(onitaly) contacts both the france OnLine database server and the australia
OnLine database server and requests that thesqlexecd daemon process
spawn a database server process.
In transactions that include multiserver modifications, the two-phase
commitprotocol assigns the role of coordinator to the current OnLine server:
in this example,italy. As coordinator, italy routes the transaction work and
tracks it at each OnLine database server that is participating in the trans-
action. Within the two-phase commit protocol, the transaction that is under
the direction of the coordinator is called theglobal transaction.
The OnLine database servers that are doing work under the direction of the
coordinatorare referred to as participants. In this example, the participants are
franceand australia. The work that each participant OnLine database server
performsis considered a piece of work associated with the global transaction.
Inthis example, the coordinator OnLine, italy, also functions as a participant
because it is also doing a piece of work, which is the update.