Distributed and Parallel Database Systems: To-Peer, Require Sophisticated Protocols

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Distributed and Parallel Database Systems

M. TAMER ÖZSU
Department of Computing Science, University of Alberta, Edmonton, Canada ^ozsu@cs.ualberta.can&

PATRICK VALDURIEZ
INRIA, Rocquencourt, Le Chesnay Cedex, France

The maturation of database manage- distinguish between client and server


ment system (DBMS) technology has co- machines. Ideally, each site can perform
incided with significant developments the functionality of a client and a
in distributed computing and parallel server. Such architectures, called peer-
processing technologies. The end result to-peer, require sophisticated protocols
is the emergence of distributed database to manage the data distributed across
management systems and parallel data- multiple sites. The complexity of re-
base management systems. These sys- quired software has delayed the offering
tems have started to become the domi- of peer-to-peer distributed DBMS prod-
nant data-management tools for highly ucts.
data-intensive applications. The database is physically distributed
A distributed database (DDB) is a col- across the data sites by fragmenting
lection of multiple, logically interrelated and replicating the data. Given a rela-
databases distributed over a computer tional database schema, fragmentation
network. A distributed database man- subdivides each relation into horizontal
agement system (distributed DBMS) is (by a selection operation) or vertical (by
then defined as the software system a projection operation) partitions. Frag-
that permits the management of the mentation is desirable because it makes
distributed database and makes the dis- possible the placement of data in close
tribution transparent to the users [Özsu proximity to its place of use, thus poten-
and Valduriez 1991]. tially reducing transmission cost, and it
There are many possible distributed reduces the size of relations involved in
DBMS implementation alternatives. user queries.
Client/server architectures [Orfali et al. Based on the user access patterns,
1994], where multiple clients access a each of the fragments may also be repli-
single database server, is the most cated. This is preferable when the same
straightforward. Multiple-client/multi- data are accessed from applications that
ple server architectures are more flexi- run at a number of sites. In this case, it
ble because the database is distributed may be more cost-effective to duplicate
across multiple servers. Each client ma- the data at a number of sites rather than
chine has a “home” server to which it continuously move it between them.
directs user requests. The communica- A parallel DBMS [Valduriez 1993]
tion of the servers among themselves to can be defined as a DBMS implemented
execute user queries and transactions is on a tightly coupled multiprocessor. The
transparent to the users. Most current differences between a parallel DBMS
database management systems imple- and a distributed DBMS are somewhat
ment one or the other type of client- unclear. In particular, shared-nothing
server architectures. parallel DBMS architectures, which we
A truly distributed DBMS does not discuss in the following, are quite simi-

Copyright © 1996, CRC Press.

ACM Computing Surveys, Vol. 28, No. 1, March 1996


126 • M. Tamer Özsu and Patrick Valduriez

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

ACM Computing Surveys, Vol. 28, No. 1, March 1996


Distributed and Parallel Database Systems • 127

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].

ACM Computing Surveys, Vol. 28, No. 1, March 1996


128 • M. Tamer Özsu and Patrick Valduriez

REFERENCES Essential Client/Server Survival Guide.


Wiley, New York.
DOGAC, A., ÖZSU, M. T., BILIRIS, A., AND SELLIS, T. ÖZSU, M. T. AND VALDURIEZ, P. 1991. Principles
Eds. 1994. Advances in Object-Oriented of Distributed Database Systems. Prentice-
Database Systems. Springer-Verlag, Berlin. Hall, Englewood Cliffs, NJ.
ELMAGARMID, A. K., ED. 1992. Transaction ÖZSU, M. T., DAYAL, U., AND VALDURIEZ, P.,
Models for Advanced Database Applications. EDS. 1994. Distributed Object Manage-
Morgan-Kaufmann, San Mateo, CA. ment. Morgan-Kaufmann, San Mateo, CA.
GRAY, J. N. 1979. Notes on data base operating SHETH, A. AND LARSON, J. 1990. Federated da-
systems. In Operating Systems: An Advanced tabases: Architectures and integration. ACM
Course. R. Bayer, R. M. Graham, and G. Seeg- Comput. Surv. 22, 3 (Sept.), 183–236.
müller, Eds., Springer-Verlag, New York, VALDURIEZ, P. 1993. Parallel database systems:
393– 481. Open problems and new issues. Distrib. Par-
ORFALI, R., HARKEY, D., AND EDWARDS, J. 1994. allel Databases 1, 2 (April), 137–165.

ACM Computing Surveys, Vol. 28, No. 1, March 1996

You might also like