Professional Documents
Culture Documents
Distributed and Parallel Database Systems: To-Peer, Require Sophisticated Protocols
Distributed and Parallel Database Systems: To-Peer, Require Sophisticated Protocols
Distributed and Parallel Database Systems: To-Peer, Require Sophisticated Protocols
M. TAMER ÖZSU
Department of Computing Science, University of Alberta, Edmonton, Canada ^ozsu@cs.ualberta.can&
PATRICK VALDURIEZ
INRIA, Rocquencourt, Le Chesnay Cedex, France
lar to the loosely interconnected distrib- ing and optimization techniques have to
uted systems. Perhaps an important address difficulties arising from the
distinction is that distributed DBMSs fragmentation and distribution of data.
assume loose interconnection between To deal with fragmentation, data local-
processors that have their own operat- ization techniques are used where an
ing systems and operate independently. algebraic query, which is specified on
Parallel DBMSs exploit recent multi- global relations, is transformed into one
processor computer architectures in or- that operates on fragments rather than
der to build high-performance and high- global relations. In the process, opportu-
availability database servers at a much nities for parallel execution are identi-
lower price than equivalent mainframe fied (because fragments are stored at
computers. different sites) and unnecessary work is
Parallel system architectures range eliminated (because some of the frag-
between two extremes, the shared-noth- ments are not involved in the query).
ing and the shared-memory architec- Localization requires the optimization
tures. A useful intermediate point is the of global operations, which is under-
shared-disk architecture. In the shared- taken as part of global query optimiza-
nothing approach, each processor has tion. Global query optimization involves
exclusive access to its main memory and permuting the order of operations in a
disk unit(s). Thus each node can be query, determining the execution sites
viewed as a local site (with its own for various distributed operations, and
database and software) in a distributed identifying the best distributed execu-
DBMS. In the shared-memory ap- tion algorithm for distributed opera-
proach, any processor has access to any tions (especially the joins).
memory module or disk unit through a Parallel query optimization takes ad-
fast interconnect (e.g., a high-speed bus vantage of both intra-operation parallel-
or a cross-bar switch). In the shared- ism and inter-operation parallelism. In-
disk approach, any processor has access tra-operation parallelism is achieved by
to any disk unit through the intercon- executing an operation on several nodes
nect, but exclusive (nonshared) access of a multiprocessor machine. Parallel
to its main memory. Each processor can optimization to exploit intra-operation
then access database pages on the parallelism can make use of some of the
shared disk and copy them into its own techniques devised for distributed data-
cache. To avoid conflicting accesses to bases. Inter-operation parallelism oc-
the same pages, global locking and pro- curs when two or more operations are
tocols for the maintenance of cache co- executed in parallel, either as a data-
herency are needed. flow or independently. We designate as
Distributed and parallel DBMSs pro- dataflow the form of parallelism in-
vide the same functionality as central- duced by pipelining. Independent paral-
ized DBMSs except in an environment lelism occurs when operations are exe-
where data are distributed across the cuted at the same time or in arbitrary
sites on a computer network or across order. Independent parallelism is possi-
the nodes of a multiprocessor system.
ble only when the operations do not
This functionality is provided transpar-
involve the same data.
ently; thus the users are unaware of
Concurrency control. In distributed
data distribution, fragmentation, and
DBMSs, the challenge in synchronizing
replication. Maintaining this view
concurrent user transactions is to ex-
places significant challenges on system
tend both the serializability argument
functions, which we summarize in the
and the concurrency control algorithms
following.
to the distributed execution environ-
Query Processing and Optimization. ment. In these systems, the operations
In a distributed DBMS, query process- of a given transaction may execute at
multiple sites where they access data. database system is to maintain some
Thus global serializability requires that notion of consistency among the physi-
cal instance copies when users trans-
(a) the execution of the set of transac- parently update logical data items. A
tions at each site be serializable, straightforward consistency criterion is
and one copy equivalence, which asserts that
(b) the serialization orders of these the values of all physical copies of a
transactions at all these sites be logical data item should be identical
identical. when the transaction that updates it
If locking-based algorithms are used, terminates. A typical replica-control
lock tables and lock management re- protocol that enforces one-copy serializ-
sponsibility may be centralized or dis- ability is known as Read-One/Write-All
tributed. A well-known side effect of all (ROWA) protocol. ROWA protocol is
locking-based concurrency control algo- simple and straightforward, but it re-
rithms is that they cause deadlocks. The quires that all copies of all logical data
detection and management of distrib- items that are updated by a transaction
uted deadlocks involving a number of be accessible for the transaction to ter-
sites is difficult. minate. Failure of one site may block a
transaction, reducing database avail-
Reliability Protocols. In addition to
ability.
transaction, system, and media failures
A number of alternative algorithms
that can occur in a centralized DBMS, a
have been proposed that reduce the re-
distributed DBMS must also deal with
communication failures. In particular, quirement that all copies of a logical
the existence of both system and com- data item be updated before the trans-
munication failures poses complications action can terminate. They relax ROWA
because it is not always possible to dif- by mapping each write to only a subset
ferentiate between the two. Distributed of the physical copies. One well-known
DBMS protocols have to deal with this approach is quorum-based voting, where
uncertainty. copies are assigned votes and read and
Distributed reliability protocols en- write operations have to collect votes
force atomicity (all-or-nothing property) and achieve a quorum to read/write
of transactions by implementing atomic data.
commitment protocols such as the two- Distributed and parallel DBMS tech-
phase commit (2PC) [Gray 1979]. 2PC nologies have matured to the point that
extends the effects of local atomic com- fairly sophisticated and reliable com-
mit actions to distributed transactions mercial systems are now available. As
by insisting that all sites involved in the expected, a number of issues have yet to
execution of a distributed transaction be satisfactorily resolved. These deal
agree to commit the transaction before with skewed data placement in parallel
its effects are made permanent (i.e., all DBMSs, network scaling problems (in
sites terminate the transaction in the particular, calibrating distributed
same manner). DBMSs for the specific characteristics
The inverse of termination is recov- of emerging communication technolo-
ery. Distributed recovery protocols deal gies such as broadband networks and
with the problem of recovering the data- mobile and cellular networks), advanced
base at a failed site to a consistent state transaction models (now commonly
when that site recovers from the failure. called workflow models) [Elmagarmid
Replication Protocols. In replicated 1992], multidatabase systems and in-
distributed databases, each logical data teroperability [Sheth and Larson 1990],
item has a number of physical in- and distributed object management
stances. The issue in this type of a [Dogac et al. 1994; Özsu et al. 1994].