Table of Contents
Fetching ...

A Scalable Transaction Management Framework for Consistent Document-Oriented NoSQL Databases

Adam A. E. Alflahi, Mohammed A. Y. Mohammed, Abdallah Alsammani

TL;DR

The paper tackles the challenge of providing serializable transactions in document-oriented NoSQL databases without sacrificing scalability. It introduces a four-stage middleware framework—Transaction Management, Operation Classification, Readiness (pre-execution conflict detection), and Execution with Adaptive Locking—built atop MongoDB to achieve conflict serializability under BASE semantics, reinforced by timeout-based deadlock prevention. Formal analysis proves conflict serializability and deadlock freedom, with a $O(n \log m)$ cost for conflict detection, while extensive YCSB-based experiments show substantial reductions in abort rates (up to 43.4%), notable tail-latency improvements (P99 down ~34%), and meaningful throughput gains in both single-node and distributed deployments. The results demonstrate that carefully designed consistency mechanisms can significantly improve data integrity and performance in NoSQL systems, offering a practical approach to balancing strong transactional guarantees with scalable operation.

Abstract

NoSQL databases are widely used in modern applications due to their scalability and schema flexibility, yet they often rely on eventual consistency models that limit reliable transaction processing. This study proposes a four-stage transaction management framework for document-oriented NoSQL databases, with MongoDB as the reference platform. The framework combines transaction lifecycle management, operation classification, pre-execution conflict detection, and an adaptive locking strategy with timeout-based deadlock prevention. Formal correctness analysis shows that the proposed approach guarantees conflict serializability under defined conditions. An experimental evaluation using the Yahoo Cloud Serving Benchmark (YCSB) workloads A, B, and F, with concurrency levels ranging from 1 to 100 clients, demonstrates a reduction in transaction abort rates from 8.3% to 4.7%, the elimination of observed deadlocks, and a 34.2% decrease in latency variance. Throughput improvements ranging from 6.3% to 18.4% are observed under high concurrency, particularly for read-modify-write workloads. Distributed experiments on clusters of up to 9 nodes confirm scalability, achieving 15.2% higher throughput and 53% lower abort rates than baseline systems. Comparisons with MongoDB's native transactions, CockroachDB, and TiDB indicate that the proposed framework strikes a good balance between consistency guarantees and performance overhead. Sensitivity analysis identifies optimal parameter settings, including a lock timeout of 100 ms, an initial backoff of 10 ms, and a maximum backoff of 500 ms. These results show that carefully designed consistency mechanisms can significantly improve data integrity in NoSQL systems without undermining scalability.

A Scalable Transaction Management Framework for Consistent Document-Oriented NoSQL Databases

TL;DR

The paper tackles the challenge of providing serializable transactions in document-oriented NoSQL databases without sacrificing scalability. It introduces a four-stage middleware framework—Transaction Management, Operation Classification, Readiness (pre-execution conflict detection), and Execution with Adaptive Locking—built atop MongoDB to achieve conflict serializability under BASE semantics, reinforced by timeout-based deadlock prevention. Formal analysis proves conflict serializability and deadlock freedom, with a cost for conflict detection, while extensive YCSB-based experiments show substantial reductions in abort rates (up to 43.4%), notable tail-latency improvements (P99 down ~34%), and meaningful throughput gains in both single-node and distributed deployments. The results demonstrate that carefully designed consistency mechanisms can significantly improve data integrity and performance in NoSQL systems, offering a practical approach to balancing strong transactional guarantees with scalable operation.

Abstract

NoSQL databases are widely used in modern applications due to their scalability and schema flexibility, yet they often rely on eventual consistency models that limit reliable transaction processing. This study proposes a four-stage transaction management framework for document-oriented NoSQL databases, with MongoDB as the reference platform. The framework combines transaction lifecycle management, operation classification, pre-execution conflict detection, and an adaptive locking strategy with timeout-based deadlock prevention. Formal correctness analysis shows that the proposed approach guarantees conflict serializability under defined conditions. An experimental evaluation using the Yahoo Cloud Serving Benchmark (YCSB) workloads A, B, and F, with concurrency levels ranging from 1 to 100 clients, demonstrates a reduction in transaction abort rates from 8.3% to 4.7%, the elimination of observed deadlocks, and a 34.2% decrease in latency variance. Throughput improvements ranging from 6.3% to 18.4% are observed under high concurrency, particularly for read-modify-write workloads. Distributed experiments on clusters of up to 9 nodes confirm scalability, achieving 15.2% higher throughput and 53% lower abort rates than baseline systems. Comparisons with MongoDB's native transactions, CockroachDB, and TiDB indicate that the proposed framework strikes a good balance between consistency guarantees and performance overhead. Sensitivity analysis identifies optimal parameter settings, including a lock timeout of 100 ms, an initial backoff of 10 ms, and a maximum backoff of 500 ms. These results show that carefully designed consistency mechanisms can significantly improve data integrity in NoSQL systems without undermining scalability.
Paper Structure (49 sections, 3 theorems, 14 figures, 7 tables, 5 algorithms)

This paper contains 49 sections, 3 theorems, 14 figures, 7 tables, 5 algorithms.

Key Result

Theorem 1

Under the four-stage framework with Algorithm alg:lock_acquisition locking, all committed transactions form a conflict-serializable schedule.

Figures (14)

  • Figure 1: Four-Stage Transaction Management Framework Architecture. Transactions flow sequentially through initialization, classification, readiness assessment, and execution stages. The distributed lock manager coordinates across all stages, with feedback loops enabling conflict resolution and retry handling.
  • Figure 2: Workload A: Throughput Comparison. Throughput (operations/second) across concurrency levels. Framework improvements are most pronounced at low and high concurrency, with a contention middle ground at intermediate levels where lock acquisition costs and conflict prevention benefits are more balanced.
  • Figure 3: Workload A: Update Latency Analysis. While mean latency increased due to consistency checking, variance decreased substantially. The percentage annotations show the latency change, with the variance reduction providing more predictable performance.
  • Figure 4: Workload B: Throughput Comparison. Read-optimized processing paths enable consistent throughput gains across all concurrency levels. The operation classification stage routes read-only transactions through paths that bypass write-lock acquisition.
  • Figure 5: Workload F: Throughput Comparison. Complex read-modify-write operations show substantial improvements under high concurrency. The framework's conflict detection prevents conflicting RMW transactions from proceeding simultaneously, reducing abort overhead.
  • ...and 9 more figures

Theorems & Definitions (7)

  • Definition 1: Conflict Serializability
  • Theorem 1: Serializability Guarantee
  • proof
  • Theorem 2: Deadlock Freedom
  • proof
  • Lemma 3: Progress Guarantee
  • proof