Databases Reference
In-Depth Information
DISTRIBUTED ACID SYSTEMS
To understand fully whether or not ACID expectations apply to distributed systems you need to fi rst
explore the properties of distributed systems and see how they get impacted by the ACID promise.
Distributed systems come in varying shapes, sizes, and forms
but they all have a few typical characteristics and are exposed
to similar complications. As distributed systems get larger
and more spread out, the complications get more challenging.
Added to that, if the system needs to be highly available
the challenges only get multiplied. To start out, consider an
elementary situation as illustrated in Figure 9-2.
Machine 1
Machine 2
App1
App2
Even in this simple situation with two applications, each
connected to a database and all four parts running on a
separate machine, the challenges of providing the ACID
guarantee is not trivial. In distributed systems, the ACID
principles are applied using the concept laid down by the
open XA consortium, which specifi es the need for a
transaction manager or coordinator to manage transactions
distributed across multiple transactional resources. Even
with a central coordinator, implementing isolation across
multiple databases is extremely diffi cult. This is because
different databases provide isolation guarantees differently. A few techniques like two-phase locking
(and its variant Strong Strict Two-Phase Locking or SS2PL) and two-phase commit help ameliorate
the situation a bit. However, these techniques lead to blocking operations and keep parts of the
system from being available during the states when the transaction is in process and data moves from
one consistent state to another. In long-running transactions, XA-based distributed transactions
don't work, as keeping resources blocked for a long time is not practical. Alternative strategies like
compensating operations help implement transactional fi delity in long-running distributed transactions.
Machine 1
Machine 2
DB1
DB2
FIGURE 9-2
Two-phase locking (2PL) is a style of locking in distributed transactions where
locks are only acquired (and not released) in the fi rst phase and locks are only
released (and not acquired) in the second phase.
SS2PL is a special case of a technique called commitment ordering. Read
more about commitment ordering in a research paper by: Yoav Raz (1992):
“The Principle of Commitment Ordering, or Guaranteeing Serializability in a
Heterogeneous Environment of Multiple Autonomous Resource Managers Using
Atomic Commitment” ( www.vldb.org/conf/1992/P292.PDF ), Proceedings of
the Eighteenth International Conference on Very Large Data Bases (VLDB),
pp. 292-312, Vancouver, Canada, August 1992, ISBN 1-55860-151-1 (also
DEC-TR 841, Digital Equipment Corporation, November 1990).
Two-phase commit (2PC) is a technique where the transaction coordinator
verifi es with all involved transactional objects in the fi rst phase and actually
sends a commit request to all in the second. This typically avoids partial failures
as commitment confl icts are identifi ed in the fi rst phase.
Search WWH ::




Custom Search