PART IV
Chapter 25 Distributed DBMSs Advanced Concepts
25.1 The centralized two-phase commit protocol uses a series of timeouts to prevent unnecessary
blocking. Discuss the actions for both coordinator and participants when a timeout occurs.
Consideration should be given to the various stages of the commit protocol.
See Section 25.4.3.
25.2 Under the three-phase commit protocol, discuss how the coordinator and participants would
recover following a failure. Consideration should be given to the various stages of the commit
protocol.
Coordinator Failure
1. Failure in INITIAL state. The coordinator has not yet started the commit procedure.
2. Failure in WAITING state. The coordinator has sent the prepare message and although
3. Failure in DECIDED state. The coordinator has instructed the participants to globally
4. Failure in PRE-COMMITTED state. The coordinator has instructed the participants to
Participant Failure
The objective of the recovery protocol for a participant is to ensure that a participant process on
restart performs the same action as all other participants and that this restarting can be done
independently (i.e. without the need to consult either the coordinator or the other participants).
1. Failure in INITIAL state. The participant has not yet voted on the transaction. Therefore,
3. Failure in ABORTED/COMMITTED states. Participant has completed the transaction.
25.3 Consider six transactions T1, T2, T3, T4, and T5 with:
T1 initiated at site S1 and spawning an agent at site S2,
The locking information for these transactions is shown in Table 1. Produce the local
wait-for-graphs (WFGs) for each of the sites. What can you conclude from the local
WFGs?
Transaction
Data items locked by
transaction
Data items transaction is
waiting for
Site inv
olved in
operations
T1 x1 x8 S1
Table 1
25.4 One of the most well-known methods for distributed deadlock detection was developed by
Site 1 Site 2 Site 3
25.5
detection works.
T
3
T
ext
Cycle at site 1, so move WFG from Site 1 to site 3. The resulting WFG shows a cycle:
1
T
T
T
T
T
1
T
2
T
1
T
4
T
2
T
3
Site 1 Site 2 Site 3
T
ext
Sites 1 and 3
T
ext
PART IV
Student Project
Assignment Distributed Database System Implementation
Introduction
The objective of the project for this module is to design and implement part of a Distributed Database
Management System (DDBMS).
Specification of Requirements
Design and implement a distributed database, which contains the following base functionality:
ability to fragment a relation/relations based on some specified predicate.
ability to query the global data dictionary to determine the location of any relation/field/data
item.
Marking Scheme
Analysis and Design 30