• Sonuç bulunamadı

A transaction model for multidatabase systems

N/A
N/A
Protected

Academic year: 2021

Share "A transaction model for multidatabase systems"

Copied!
4
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

A Transaction M o d e l for Multidatabase

S y s t e m s

Timu~in Devirmi~ and Ozgiir Ulusoy

Department of Computer Engineering and Information Science Bilkent University

Bilkent, Anl~ra 06533, TURKEY

1 I n t r o d u c t i o n

In this paper, we present a new transaction model for multidatabase systems (MDBSs). This model captures the formalism and semantics of various extended transaction models and adopts them to an MDBS environment. The extended models constituting our transaction model are the nested transactions [4], the flexible transaction model that provides various dependency relations among transactions [7], and the model that involves a relaxed version of transaction atomicity, namely the semantic atomicity, to increase the level of concurrency [2], [5]. While including the semantics of all those transaction models, the global serializability in our execution model was ensured through the use of the ticketing m e t h o d [3].

2 A M u l t i d a t a b a s e T r a n s a c t i o n M o d e l

In a multidatabase environment, some subtransactions can be committed inde- pendent of its global transaction. If a subtransaction's effects on the database can be semantically undone by executing a compensating transaction, the sub- transaction can be allowed to commit earlier. A subtransaction that reserves a seat in an airline reservation system is compensatable by a transaction that cancels the reservation. Another kind of commit independent transactions is the retriable transactions which eventually commit if they are retried a number of times. A retriable transaction can be committed later than the global transac- tion. Crediting a bank account is an example of retriable transactions. We will consider three transaction types ( T T ) in our model:

- Compensatable (C), - Retriable (R), or

- Ordinary (O) (neither compensatable nor retriable).

In the following, we provide a formal definition for subtransactions processed in our MDBS and the dependency relation types among subtransactions.

(2)

863 - T T is the transaction type of S;

- C T is the set of compensating transactions of S, if T T is compensatable.

D e f i n i t i o n 2 . Let S~ and

Sj

be two subtransactions. We define four types of

dependency relation between Si and

Sj.

- Precedence relation (<), Si <

Sj

means that Sj cannot begin execution until

Si successfully finishes its execution.

- Alternative relation (o), Si o Sj means that Sj and

Si

are alternative of each

other and any of them can be executed. It is also possible to execute them together, but only one of them should be committed.

- Preference relation (~,), Si ~, Sj means that among two alternative subtrans-

actions Si and Sj,

Si

is preferred to

Sj.

If they are executed together, Sj can

be c o m m i t t e d only if Si fails. If they are not allowed to execute together, Si should execute first, and if it fails, Sj can be executed.

- No-dependency relation (n),

Si[]Sj

means that Si and

Sj

can execute inde-

pendently.

A global transaction in our model is syntactically a nested transaction with extended semantics. A global transaction consists of a set of child transactions each of which is either a subtransaction or again a global transaction. This trans- action model can be represented as a tree where the internal nodes are global transactions and the leaf nodes are subtransactions. T h e height of a transaction tree can vary depending on the transaction complexity.

D e f i n i t i o n 3 . A global transaction G is a 3-tuple G = ( S T , D T , T O ) where - ST is the set of global transactions a n d / o r subtransactions that are the

children of G;

- D T is the dependency type among the transactions in ST;

- T O is the total order on ST according to the dependency specified in DT.

3 A n E x e c u t i o n A r c h i t e c t u r e f o r t h e P r o p o s e d T r a n s a c t i o n M o d e l

In our execution model, the local transactions are directly submitted to local database management systems (LDBSs), while global transactions use a com- mon MDBS interface. A global transaction, submitted to the global transaction manager (GTM), is divided into a number of subtransactions, and each sub- transaction is sent to the relevant site where the required data iterns reside. A

set of application programs called

agents

is built on top of the LDBSs to act

as an interface between G T M and each local site in controlling the execution of subtransactions.

T h e objectives of G T M are to avoid inconsistent retrieval of data, and to preserve global consistency and atomicity. The LDBS at each site ensures the local consistency and isolation properties by generating serializable schedules.

(3)

864

Global serializability can be provided by obtaining the information of relative serialization order of subtransactions at each local site and guaranteeing the s a m e relative order at all those sites [6].

3 . 1 E n s u r i n g G l o b a l A t o m i c i t y

We need to extend the traditional atomicity to capture the semantics of depen- dency relations a m o n g subtransactions. The execution of a global transaction G preserves the semantic atomicity, if the following conditions are satisfied:

- W h e n a precedence or a no-dependency relation exists a m o n g its children, G can c o m m i t if all of its child transactions commit. If one of its child transactions is aborted, G is aborted and the other child transactions are either a b o r t e d or the effects of c o m m i t t e d ones are undone.

- If an alternative or a preference relation exists, G can c o m m i t if one of its child transactions commits. When a child transaction commits, other child transactions t h a t are executing are aborted.

T h e execution of a global transaction containing only ordinary children pro- ceeds as follows.

- First, the global transaction is constructed with the initial execution state.

- G T M spawns the children of the global transaction according to the specified dependency type:

9 If either a no-dependency, or an alternative, or a preference dependency exists, all of the child transactions are created.

9 Otherwise (if a precedence relation is specified), the children are created on the basis of the given total order.

- I f G T M reaches a leaf node in the nested transaction tree and creates a sub- transaction, it s u b m i t s the subtransaction to the corresponding site through the agents.

- W h e n a subtransaction finishes its database operations, the agent of t h a t

site sends a r e a d y - t o - c o m m i t message to G T M .

- After receiving a r e a d y - t o - c o m m i t message for a subtransaction, G T M checks the dependency type associated with the parent of the subtransaction to find out w h a t to do next.

9 I f a precedence relation exists a m o n g its children, the next child transac- tion in the given order is created by G T M . If all of the child transactions enter the r e a d y - t o - c o m m i t state, the parent also enters the ready-to- c o m m i t state.

9 If an alternative relation exists, the parent enters the r e a d y - t o - c o m m i t state and G T M sends messages to the relevant agents to abort the other child transactions.

9 I f a preference relation exists, the parent enters the r e a d y - t o - c o m m i t state if the completed subtransaction is the most preferred one. When the parent becomes ready to commit, G T M broadcasts the abort message for the other child transactions.

(4)

865

9 If a no-dependency relation exists, the execution state of the parent becomes r e a d y - t o - c o m m i t after all of its children enter the ready-to- c o m m i t state.

- If the root transaction enters the r e a d y - t o - c o m m i t state, G T M decides to c o m m i t or abort the transaction according to the concurrency control algo- r i t h m executed.

- After a c o m m i t or abort is issued for the root transaction, G T M broadcasts a message to child transactions down to the leaves of the transaction tree to c o m m i t or abort the subtransactions at local sites.

3.2

Ensuring Global Serializability

T h e global seriatizability is ensured in our execution model by employing a ticketing-based concurrency control for global transactions. T h e ticket values ob- tained by subtransactions are transferred to their parents up to the root transac- tion. G T M ensures the same relative serialization order at all sites of the global root transaction using the ticket values obtained. T w o possible m e t h o d s t h a t can be used to control concurrent execution of global transactions are the opti- mistic ticketing m e t h o d , and the conservative ticketing m e t h o d [3]. Due to the space limitation the i m p l e m e n t a t i o n details of these two m e t h o d s in our execu- tion model are not included in this paper. Interested readers are referred to [1], which also includes the details of the execution strategies for c o m m i t indepen- dent subtransactions. T h e performance implications of the proposed transaction model are also discussed in [1].

R e f e r e n c e s

1. T. Devirmi~: Transaction Execution in Multidatabase Systems. M.S. Thesis in preparation, Department of Computer Engineering and Information Science, Bilkent University (1996)

2. A. Elmagarmid, Y.Leu, W. Litwin, M. Rusinkiewicz: A Multidatabase Transaction Model for Interbase. VLDB Conference (1990) 507-518

3. D. Georgakopoulos, M. Rusinkiewicz, A.P.Sheth: Using Tickets to Enforce the Se- rializability of Multidatabase Transaction. IEEE Transactions on Knowledge and Data Engineering 6 (1994) 166-180

4. J.E.Moss: Nested Transactions: An Approach to Reliable Distributed Computing. MIT Press (1985)

5. S. Mehrotra, R. Rastogi, H.F. Korth, A. Silberschatz: A Transaction Model for Mul- tidatabase Systems. Technical Report TR-92-14, Department of Computer Science, University of Texas at Austin (1992)

6. M. Rusinkiewicz, P.Krychniak, A. Cichocki: Towards a Model for Multidatabase Transactions. Technical Report UH-CS-92-18, Department of Computer Science, University of Houston (1992)

7. A. Zhang, M. Nodine, B. Bhargava, O. Bukhres: Ensuring Relaxed Atomicity for Flexible Transaction in Multidatabase Systems. ACM SIGMOD Conference (1994) 67-78

Referanslar

Benzer Belgeler

Sonu&lt;;olarak diren9i subdural kolleksiyon vaka- lannda kraniotomi ile membran rezeksiyonlanmn es- ki popularitesini kaybettigide goz oniine almarak subdural ~ant

As a paired color, there is no difference among the other pairs except when Green is on top and White is on the bottom, which results in the pair being perceived as more intimate

On the other hand, before the discovery of this inscription from Ancyra and the clear proof it provides that members of the legio XXX Ulpia Victrix Pia Fidelis were in the east in

In addition to the QDs whose spectral X, trion, and BX behaviors are provided in Figure 4, we measured and obtained integrated TRF decay terms under high- intensity excitation for

For the unpassivated detector, dark current density deviate from the Arrhenius type of behavior at the temperatures lower than 140 K indicating surface related currents start to

In the first part, given an input document, we develop a framework for discovering story chains in a text collection. A story chain is a set of related news articles that reveal

[r]

[13] Araştırmaya katılan bireylerin %51,8’inin warfarin kullanımına neden olan kalp rahatsızlığı dışında başka bir rahatsızlığı bulunurken, %73,7’sinin