Elsevier

Data & Knowledge Engineering

Volume 62, Issue 3, September 2007, Pages 547-577
Data & Knowledge Engineering

Performance analysis of long-lived cooperative transactions in active DBMS

https://doi.org/10.1016/j.datak.2006.11.001Get rights and content

Abstract

Active database management systems (ADBMS) are used in different application domains and especially for cooperative and long duration activity management. This paper deals with performance analysis of long-lived cooperative transaction processing in an ADBMS. We first briefly discuss NP-QuadLock – a concurrency control scheme for cooperative and long durational transactions in ADBMS. A restricted version of NP-QuadLock named 2L-QuadLock has been used for simulation. We have modeled such an ADBMS supporting 2L-QuadLock scheme by a queuing model. The failure of the transactions running in such systems has been modeled by a failure recovery model. We have simulated this model for a transaction processing system serving long-lived and cooperative transactions. We also discuss some important emerging application scenarios, where the proposed cooperative complex transaction mechanism can be used (e.g. 3G-service environment, ubiquitous computing environment, feature composition in intelligent network environment, multi-site and multi-domain web-services).

An important objective of our work is to analyze quantitatively (a) the performance penalty on the system due to the partial abort, the number of locks held by a transaction, the number of states of the transactions, and (b) the gain in the performance of the system with the cooperation semantics proposed in 2L-QuadLock concurrency control mechanism. We have analyzed the effect of various parameters such as partial abort rate, cooperation rate, number of locks held by a transaction, multiprogramming level, on the performance metrics such as average service time, average saga length and the degree of compensation. Later, we characterize the application scenarios based on some important simulation parameters, and discuss the application performance needs for each of the application scenarios. The required performance parameters that need to be used for these application scenarios and the corresponding performance results using 2L-QuadLock are also discussed.

Introduction

Traditional database systems are called passive because they execute transactions or query only when they are explicitly requested by the user or the application program. In contrast, active database systems are capable of executing transactions whenever some events occur. The occurrence of these events may take place due to changes in the database states. In active DBMS (ADBMS), transactions have the ability to monitor the database objects and to take specific actions when a particular event occurs in the database objects. This is specified by means of Event–Condition–Action rules or ECA rules. These events may be generated due to a transaction’s own object operation or due to the object operations generated by other transactions running in parallel. For some advanced database applications, it is necessary to monitor the conditions defined on the states of the database. As the conditions are satisfied, appropriate actions are invoked subject to the timing constraints. Examples of such applications, which are currently being developed using active databases, are hospital information system [1], Trading and stock control [2], Workflow management [3].

Increasing concurrency among transactions and maintaining the consistency of the database are two conflicting goals. This problem becomes more acute in ADBMS in the presence of long durational and cooperative transactions. The traditional notion of serializability as a correctness criterion turns out to be a bottleneck for long durational and cooperative transactions. In order to overcome this bottleneck, different kinds of transaction models e.g. Saga [4], [5], nested transaction [6], cooperative transactions [7] have been developed. These transaction models generally use relaxed notion of correctness i.e., ACID (Atomicity, Consistency, Isolation and Durability) properties.

A transaction, which takes relatively long time to complete its execution even without any interference from other transactions, is known as Long Duration Transaction or Long-Lived transaction (LLT). Since an LLT takes a long time to finish its computation, it is more vulnerable to failures [8]. In addition, if an LLT retains all the locks acquired by it until it commits, a large amount of work has to be undone in the event of abort. This makes the recovery procedure more complicated and costly affair. An LLT imposes a relatively long waiting time for short transactions waiting for the locks acquired by the LLT. Thus, an LLT imposes serious constraints on the overall performance of the system.

A Saga [4], [5] is a long durational transaction model that can be expressed as a series of subtransactions, called component transactions, which can be interleaved with other concurrently executing component transactions. If any activity needs to be aborted or partially aborted, a compensatory action may be taken for committed component transactions. These transactions are known as compensating transactions. Sagas provide high degree of concurrency by releasing the locks at the commit of the component transactions. A component transaction is executed atomically and it retains the locks until commit, following the two-phase locking protocol. Since Sagas are also LLTs, the overhead required to restore data consistency in case of failures cannot be avoided. However, Sagas support forward progress of activities.

Using an ADBMS, we can model long-lived transactions, where a transaction can be viewed as a collection of subtransactions. Execution dependencies among the subtransactions are not only defined in terms of significant events e.g. (Begin, Commit, Abort) of subtransactions but also in terms of monitored data base object events.

An ADBMS transaction may interact with other concurrent transactions by making its changes in the database accessible to other concurrently running transactions. Thus, a transaction processing system requires a controlled cooperation among these concurrent transactions. This means that before the commit of a transaction, the effects of execution of the transaction on the database will be visible only to those transactions that can cooperate with it.

In our earlier work, the execution of long durational and cooperative transactions has been investigated in [9], [10], where a concurrency control scheme named NP-QuadLock has been proposed. NP-QuadLock exploits the semantics of the transactions to achieve better cooperation and concurrency among the ADBMS transactions. It gives a suitable criterion for “correctness” of execution of ADBMS transactions in the presence of inter-transactional events and detached mode ECA rules.

In this paper, we build on that work by focusing on the performance analysis of NP-QuadLock scheme by means of simulation. The purpose of this simulation study is to analyze the performance of NP-QuadLock scheme quantitatively due to the partial aborts, number of locks held by a transaction, number of states in a transaction, and degree of multiprogramming. The NP-QuadLock locking scheme has the ability to handle nested and concurrently fired (sub)transactions. It also supports compensation of the (sub)transactions by means of compensating transactions. In our simulation studies, we have used a restricted version of NP-QuadLock scheme with two levels of nesting. We call this restricted NP-QuadLock scheme as 2L-QuadLock. The transactions generated by NP-QuadLock or 2L-QuadLock schemes are called NP-CT or 2L-CT transactions respectively. We have shown that the proposed 2L-QuadLock scheme behaves like a Saga [4], [5], [11], [12] when the cooperation among the complex transaction types is very high. On the other hand, with low cooperation rate the transactions in the present scheme behave like classical atomic transactions. Thus, 2L-QuadLock scheme can be adopted to deal with atomic transactions as well as long-lived transactions by varying the degree of cooperation among the complex transactions.

Thus the goals of our simulation study are:

  • Evaluate quantitatively the proposed 2L-QuadLock scheme with different cooperation rates, transaction sizes, conflict rates, fault rates and multiprogramming level.

  • Study the efficacy of this scheme in presence of long durational and cooperative transactions in active DBMS.

  • Show the effectiveness of the 2L-QuadLock scheme in other application scenarios, for example, in 3G service environment, ubiquitous computing environment, Multi-site workflows, Multi-site web-services, batch applications and batch utilities, and feature composition in Intelligent Network environments.

We have developed an event-driven simulator to study the performance of 2L-QuadLock under different fault conditions and cooperation rates among the complex transactions.

Our simulation study is based on a queuing network model which captures the primary features of long durational and cooperative transaction processing systems namely data locking, transaction cooperation, resource contention, and failure recovery. The simulation experiments have been carried out by varying several parameters such as number of locks per transaction, cooperation rate, failure rate, and multiprogramming level. The simulation experiments indicate that complex transactions with high cooperation rates outperform complex transactions with low cooperation rates over a wide range of multiprogramming level, failure rates, and number of locks to be acquired by the transactions. This reinforces our confidence on the proposed locking schemes for long duration and cooperative transactions.

The performance analysis of the locking protocols had received considerable attention in past years. However, most of these investigations [13], [14], [15], [16], [17], [18] concentrated on one type of concurrency control policy such as locking, time-stamp, etc., and assumed there are no precedence constraints among transactions. Menasce and Nakanishi [19] and Morris and Wong [20] have studied the trade-off between the optimistic and pessimistic concurrency control methods, but their models are applicable only to a system with a single class of transactions, with no consideration of precedence constraints and cooperation among the transactions. The performance analysis of long-lived transaction processing system in presence of rollbacks and aborts has been investigated by Liang and Tripathi [8].

Active database systems with ECA rules have been found to provide an elegant framework for capturing semantics of many real-life applications which are long durational and cooperative in nature [21], [22]. Extended transaction models have been proposed to define the semantics of rule evaluation [23]. In [23], [1], [24], an extended nested transaction model has been proposed to define the semantics of rule evaluation of HIPAC – an Active Relational database. In other active relational databases like Starburst [25], [26] and Heraclitus [27], the rules are fired as part of the event generating transaction, with different execution semantics defining order of execution of rules and the methods to compose the updates of the rules. ODE, an active object oriented DBMS (AODBMS) has used an extended nested transaction model proposed in [28] for executing rules. In all of these schemes, the action part of the rule is always fired as part of the event generating transaction, i.e., the events are always intra-transactional. In another AODBMS named Sentinel [29], [30], an effort has been made to take care of inter-transactional events, i.e., where transaction generated events cross transaction and application boundaries. Thus, a transaction can take action using an event generated by another concurrently running transaction belonging to a different application.

In some AODBMS, the long duration and cooperative transactions are modeled as a set of ECA rules with different modes of coupling [23]. The flexibility of rule execution is guaranteed through the definition of various coupling modes that define the execution of rules or parts thereof relative to the triggering transactions. HIPAC recognized four coupling modes, namely immediate, deferred, detached and parallel detached causally dependent. In [31], [32], it was shown that for closed database applications these coupling modes are sufficient.

For open environments, i.e., situations in which rules may cause non-recoverable side effects and also provides cooperation among the transactions, two additional coupling modes are required, namely sequentially detached causally dependent and exclusive detached causally dependent [31], [32]. However, the execution semantics of AODBMS transactions for this kind of open environments still do not exist. For this kind of open environment, the open nested transactions as suggested by ODMG [33] can provide suitable execution framework for AODBMS transactions. Thus, using ECA rules one can define the control flow and cooperation semantics within the subtransactions of an open nested transaction. The application systems currently being developed with active databases like hospital information system [1], [24], trading and stock control [2], workflow management [3], etc. require transaction models which are of long-duration and cooperative in nature. These applications also require monitoring capability of the database — to take particular action (or transaction firing) depending on the current state of the database. A running transaction may interact with other concurrently running transactions by making its changes in the database accessible to other transactions running in parallel. Thus, these transactions require a controlled-cooperation among them.

The main problem with ECA rules is that they do not have a concept of correctness when the inter-transactional events and detached mode rules are taken into account. Thus, it is impossible to determine if an execution of a set of transactions is “correct” in presence of detached mode ECA rules and inter-transactional events. Also using ECA rules, we cannot define how transaction of one type may cooperate with other transaction types. In this paper, we address these issues and define a concurrency control mechanism for such type of long durational and cooperative AODBMS transactions.

The preceding discussions reveal that none of the AODBMS mentioned above support horizontal cooperation, i.e., where a transaction’s effect may be read by other transactions running in parallel, based on some user defined transaction cooperation semantics. Vertical cooperation, i.e., parent–child cooperation is supported by some execution models based on extension of nested transaction model. It was pointed out in [34], [35] that using horizontal cooperation, cooperative applications like workflows, cooperative editing, etc. can be handled. It was argued in [36], that how far ECA rules should be allowed to influence the application program need to be carefully analyzed. On the one hand, one can argue that database systems should not be seen as a mere slave to the application, but rather should be able to autonomously control the application activities in various ways [34], [35]. On the other hand, it should also be possible that the application need not be aware of the underlying active capabilities if it chooses to do so.

In our work on NP-QuadLock-based concurrency control scheme, we have delved into these aspects. In this paper, we do a performance analysis of the concurrency control scheme 2L-QuadLock, a restricted version of NP-QuadLock, for cooperative and long duration transaction management in AODBMS based on an open nested transaction framework. NP-QuadLock exploits the semantics of the transactions to achieve better cooperation and concurrency among the transactions. The NP-QuadLock scheme helps in defining the execution semantics of AODBMS transactions in presence of inter-transactional events and detached mode ECA rules.

This paper is organized as follows. We discuss some preliminary concepts concerning complex transactions and base transactions and provide the necessary definitions in Section 2. The compensation issues of the 2L-CT complex transactions are discussed in Section 3. We discuss some example application scenarios, where 2L-CT complex transactions can be used in Section 4. The locking mechanism for 2L-CT transactions are discussed in Section 5. In Section 6, we discuss the queuing model of the database system which we have used in our simulation of 2L-QuadLock scheme. The important parameters that we have used in the simulation are discussed in Section 7. The fault model of a complex transaction type has been discussed in Section 8. Section 9 presents the simulation results obtained in different fault conditions, multiprogramming levels, number of locks acquired by the transactions, and cooperation rates. In Section 10, we characterize different application scenarios based on some important simulation parameters, and, discuss the application performance needs for each of these application scenarios. We show how the simulation parameters set-up (presented in Section 9) relates to application scenarios (of Section 4). The performance results achieved with the corresponding simulation parameters, for each of the application scenarios, are also discussed in this section. Section 11 concludes this paper and provides direction for future works.

Section snippets

Preliminary concepts

In this section, we discuss some concepts crucial to our work and introduce some definitions and notations.

An ECA rule has the following structure:

  • rulerulename〉:

    • onevent expression

    • ifcondition expression

    • thenaction expression〉 /∗ e.g., a base transaction firing ∗/

    • rulemode

where
  • Event expression: The event expression is defined in terms of observed database object events generated by the transactions.

  • Condition expression: It denotes the precondition for the execution of the base

Compensation of 2L-CT complex transactions

The compensation model for NP-CT complex transactions and a correctness criterion for it have been proposed in [9]. This correctness criterion also takes care of cooperation among the complex transactions. The main advantage of this approach is that it allows reasoning about histories with compensation operations, using only knowledge about the cooperation and compensation semantics as specified by the user, without reference to the semantics of database states. Since 2L-CT transactions are a

Example application scenarios of 2L-CT complex transaction

In this section, we will show some example application scenarios, where our 2L-CT complex transaction scheme in ADBMS will be of use. The chosen application scenarios are the following:

  • Composition of cooperative mobile transaction in 3G service environment.

  • Composition of multi-site web-services across multiple resource domains.

  • Multi-site workflows and Multidatabase transactions using cooperating ADBMS transactions.

  • Controlled resource cooperation among concurrently running batch applications.

2L-QuadLock: a concurrency control scheme for 2L-CT complex transaction

The 2L-QuadLock mechanism uses a modified version of Moss’s locking algorithm for nested transactions [6]. The locking algorithm (i) ensures serializable schedule of individual BTs, (ii) produces a correct history according to cooperation semantics of the CT types, and (iii) handles abort and partial abort of the complex transactions.

The individual BTs acquire locks with their own transaction-ids. A BT acquires locks in a two-phase manner by requesting the global scheduler. A BT can potentially

The queuing model

In this section, we present a queuing model of an ADBMS, which follows the 2L-QuadLock scheme. The ADBMS is modeled by a network of queues and services as shown in Fig. 7. It consists of a set of terminals, a transaction manager (TM), a lock manager (LM), a TM waiting queue (TMQ), a LM waiting queue (LMQ), a set of query servers, and a fault diagnosis center. The closed queuing system comprising of LM, LMQ, query servers, and fault diagnosis center, is called as a Transaction Processing Unit

Simulation parameters

In the simulation, we have used following parameters:

  • Full abort rate (μ):

    The full abort rate defines the probability that when a base transaction aborts, the complex transaction fully aborts. From now onwards, whenever we talk of ‘abort’, we will mean ‘full abort’ only.

  • Partial abort rate (γ):

    The partial abort rate γ defines the probability that when a base transaction aborts, the complex transaction aborts partially.

  • Full commit rate (β):

    The full commit rate β defines the probability that on

The failure recovery model of a complex transaction

We now present the fault model used to simulate a complex transaction. The complex transaction types are generated according to this fault model. In particular, the STG of different complex transaction types are generated by selecting suitable values of the following parameters:

  • The total number of complex transaction types (m).

  • Number of ‘non-final’ states in the STG (k); these non-final states are in addition to the two designated final states ssucc and sfail which correspond to successful and

Simulation results

Based on the queuing model and the fault model described in Section 8, we have conducted a series of simulation studies. The objective of the simulation studies is to examine the impact of the failure on the performance of a cooperative transaction. As discussed earlier, long-lived transactions suffer from overhead of the rollback recovery during system failures. The factors that can affect the amount of overhead are multiprogramming level (N), partial abort rate (γ), number of states of a

Discussion of performance results for the application scenarios

In this section, we will provide a short discussion describing the application characteristics and application performance needs for each of the application scenarios mentioned in Section 4. We will discuss whether cooperativeness among the applications of a given application type is enabling to achieve the performance needs of the applications under the given application characteristics. In this quest, we will be referring to the simulation parameters used and simulation results of Section 9.

Conclusions and future work

In this paper, we have analyzed the performance of the 2L-QuadLock scheme in presence of rollbacks and aborts by simulation. One of the objectives of this study has been to determine the extent of performance gain of the system with transaction cooperation, even in the presence of full/partial aborts and compensating actions. Another objective of this paper has been to show the efficacy of the presented cooperative transaction management scheme in different emerging application scenarios (e.g.

Acknowledgement

The authors would like to thank the anonymous reviewers for their constructive suggestions and guidance, which definitely improved the quality of the paper.

Prithwish Kangsabanik obtained his Bachelors in Computer Science & Technology from Bengal Engineering College, Shibpur, India. He obtained his Masters and Ph.D. in Computer Science & Engineering from Indian Institute of Technology, Kharagpur. He is presently working as an Information & Communication Technology Architect in UBS, Switzerland. He will be joining Swisscom, the market-leading telecommunication service provider of Switzerland, as a Solution Architect from Mar, 2007. He has worked in

References (45)

  • B. Galler et al.

    A model of transaction blocking in databases

    Performance Evaluation

    (1983)
  • R. Morris et al.

    Performance analysis of locking and optimistic concurrency control algorithms

    Performance Evaluation

    (1985)
  • U. Dayal, M. Hsu, R. Ladlin, Organizing long running activities with triggers and transactions, in: Proceedings of the...
  • W. Naqvi et al.

    Rule and knowledge management in active databases

  • C. Bussler et al.

    Implementing agent coordination for workflow management systems using active database system

  • K. Garcia-Molina, Salem, SAGAS, in: Proceedings of the ACM SIGMOD International Conference on Management of Data, May...
  • H. Garcia-Molina, D. Gawlick, J. Klein, K. Kleinser, K. Salem, Coordinating multi-transaction activities, Tech. Report...
  • J. Moss, Nested transactions: an approach to reliable distributed computing, in: Proceedings ACM SIGMOD International...
  • H.F. Korth et al.

    Formal aspects of concurrency control in long-duration transaction systems – using NT/PV model

    ACM Transactions on Database Systems

    (1994)
  • D. Liang et al.

    Performance analysis of long-lived transaction processing systems with rollbacks and aborts

    IEEE Transactions on Knowledge and Data Engineering

    (1996)
  • P. Kangsabanik et al.

    Semantic based concurrency control of open nested transactions in active object DBMS

    Distributed and Parallel Database Systems – International Journal

    (2000)
  • P. Kangsabanik et al.

    Concurrency control of nested cooperative transactions in active DBMS

  • H. Garcia-Molina et al.

    Modeling long-running activities as nested sagas

    Bulletin of the IEEE Technical Committee Data Engineering

    (1991)
  • P. Chrysanthis et al.

    ACTA: the SAGA continues

  • D. Mitra et al.

    Probabilistic models of database locking: solutions, computational algorithms and asymptotics

    Journal of Association of Computing Machinery

    (1984)
  • D. Potier et al.

    Analysis of locking policies in database management systems

    Communications of the ACM

    (1980)
  • Y. Tay et al.

    A mean value performance model for locking in databases: the no-waiting case

    Journal of Association of Computing Machinery

    (1985)
  • A. Thomasian, I. Ryu, A decomposition solution to the queuing network model of the centralized DBMS with static...
  • R. Agrawal et al.

    Concurrency control performance modeling: alternatives and implications

    ACM Transactions on Database Systems

    (1987)
  • D. Menace et al.

    Optimistic versus pessimistic concurrency control mechanisms in database management systems

    Information Systems

    (1982)
  • U. Dayal, Active database management systems, in: Proceedings of the 3rd International Conference of Data and Knowledge...
  • B. Purimetla, R.M. Sivasankaran, J.A. Stankovic, A study of distributed real-time active database applications, in:...
  • Cited by (2)

    • Using advanced transaction models for flow-through exception handling in NGN-OSS/NGN-BSS

      2017, 2016 International Conference on Intelligent Control, Power and Instrumentation, ICICPI 2016

    Prithwish Kangsabanik obtained his Bachelors in Computer Science & Technology from Bengal Engineering College, Shibpur, India. He obtained his Masters and Ph.D. in Computer Science & Engineering from Indian Institute of Technology, Kharagpur. He is presently working as an Information & Communication Technology Architect in UBS, Switzerland. He will be joining Swisscom, the market-leading telecommunication service provider of Switzerland, as a Solution Architect from Mar, 2007. He has worked in various Industrial and academic R&D projects. His research interests are in the area of high-available system design, mobile & pervasive computing, computer networks, telecommunication systems, and active database management systems. He has published extensively in International Journals and Conference in the area of DBMS kernel design, application modeling & concurrency control in active DBMS, object oriented fuzzy expert systems design, and mobile transactions models in 3G service environment. He is a Senior Member of IEEE and a professional member of ACM.

    Divakar Singh Yadav obtained his B.Tech. from G B Pant University, Pantnagar, India and his M.Tech in Computer Science & information Technology from Indian Institute of Technology, Kharagpur, India. He is currently working towards his Ph.D. in Dependable Systems & Software Engineering group at University of Southampton, UK as a Commonwealth scholar.

    Rajib Mall completed his Bachelor’s, Master’s, and Ph.D degrees, all from Indian Institute of Science, Bangalore. He is currently working as a Professor at the Department of Computer Science and Engineering at Indian Institute of Technology, Kharagpur, India. He researches in the areas of analysis and testing of object-oriented programs and active database management systems.

    Arun kumar Majumdar obtained B. Tech, M. Tech and Ph.D. degrees in Applied Physics from the University of Calcutta in 1967, 1968 and 1973, respectively. He also obtained a Ph.D. degree in Electrical Engineering from the University of Florida, Gainesville, USA, in 1976. He is currently working as a Professor in Department of Computer Science & Engineering at Indian Institute of Technology, Kharagpur. His research interests are in the area of Data and Knowledge-based Systems, Multimedia Systems, Medical Informatics, VLSI Design Automation. He is a Fellow of Indian National Academy of Engineering and Institute of Engineers (India). He is also a Senior Member of IEEE(USA).

    View full text