NonStop Systems Introduction
Transaction Management
NonStop Systems Introduction—527825-001
5-4
Local and Distributed Transactions
Local and Distributed Transactions
TMF can manage transactions whether they are local or distributed. Whatever the
complexity or geographic scope of the transaction, TMF treats it as a single unit of
work and protects the consistency of all databases involved in the transaction.
A local transaction updates records at a single location. For example, a money-
transfer transaction that moves funds from a customer’s checking account to a savings
account is likely to be a local transaction because the file containing customer
checking account records and the file containing customer savings account records are
probably at the same location.
A distributed transaction updates records at more than one location. Look again at the
order-entry example to see the normal processing of a distributed TMF transaction.
Although processing takes place on multiple nodes, TMF treats all the distributed
processing steps in Figure 5-2 on page 5-4 as a single logical transaction.
In this example, the transaction is reading and writing data on three network nodes:
•
The transaction reads stock records at the warehouse’s inventory database to
make sure there is enough stock to fill the order. After the order is placed, the
transaction updates the stock records to reflect the decreased quantity on hand for
the ordered items.
•
The transaction writes an order record to the sales order database at the sales
office where the transaction originated.
•
If filling the order causes the quantity on hand of any item to fall below the reorder
point (the point at which stock needs to be replenished), the transaction writes a
purchase order to the purchase-order database at headquarters.
Figure 5-2. Distributed TMF Transaction
BEGIN TRANSACTION
Sales office
Headquarters
Warehouse
Order entry system databases
Read stock record.
Enough stock?
Need to reorder?
Update stock record.
Issue purchase order.
END TRANSACTION
vsd057.vst
Write order detail record.