Ziliang Lai, Hua Fan, Wenchao Zhou et al. · 2023
Two-phase-commit (2PC) has been widely adopted for distributed transaction processing, but it also jeopardizes throughput by introducing two rounds of network communications and two durable log writes to a transaction's critical path. Despite the various proposals that eliminate 2PC such as deterministic database and access localization, 2PC remains the de facto standard since the alternatives often lack generality (e.g., requiring workloads without branches based on query results). In this paper, we present Primo, a distributed transaction protocol that supports a more general set of workloads without 2PC. Primo features write-conflict-free concurrency control that guarantees once a transaction enters the commit phase, no concurrency conflict (e.g., deadlock) would occur when installing the write-set — hence the prepare phase is no longer needed to account for any potential conflict from any partition. In addition, Primo further optimizes the transaction path using asynchronous group commit. With that, the durability delay is also taken off the transaction's critical path. Empirical results on Primo are encouraging – in YCSB and TPC-C, Primo attains 1.42× to 8.25× higher throughput than state-of-the-art general protocols including Sundial and COCO, while having similar latency as COCO which also employs group commit.
Cited by 5
Allison Shapiro, Scott T. Grafton · PLoS ONE · 2020
Two fundamental goals of decision making are to select actions that maximize rewards while minimizing costs and to have strong confidence in the accuracy of a judgment. Neural signatures of these two forms of value: the subjective value (SV) of choice alternatives and the value of the judgment (confidence), have both been observed in ventromedial prefrontal cortex (vmPFC). However, the relationship between these dual value signals and their relative time courses are unknown. Twenty-eight men and women underwent fMRI while performing a two-phase approach-avoidance (Ap-Av) task with mixed-outcomes of monetary rewards paired with painful shock stimuli. Neural responses were measured during offer valuation (offer phase) and choice valuation (commit phase) and analyzed with respect to observed decision outcomes, model-estimated SV and confidence. During the offer phase, vmPFC tracked SV and the decision but not confidence. During the commit phase, vmPFC tracked confidence, computed as the quadratic extension of SV, but not the offer valuation nor the decision. In fact, vmPFC responses from the commit phase were selective for confidence even for reject decisions wherein confidence and SV are inversely related. Conversely, activation of the cognitive control network, including within lateral prefrontal cortex (lPFC) and dorsal anterior cingulate cortex (dACC) was associated with ambivalence, during both the offer and commit phases. Taken together, our results reveal complementary representations in vmPFC during value-based decision making that temporally dissociate such that offer valuation (SV) emerges before decision valuation (confidence).
Cited by 50Open access
NARENDRA KUMAR NUTALAPATI · Zenodo (CERN European Organization for Nuclear Research) · 2026
Reference implementation of LICITRA-MMR, an open-source ledger primitive that combines a Merkle Mountain Range (MMR) data structure with per-organization epoch anchoring, a versioned canonical JSON specification, and an atomic two-phase commit pipeline for cryptographic audit integrity in agentic AI systems. Contains: MMR construction module, canonical JSON serializer, two-phase commit pipeline, epoch chaining, inclusion proof generation, 11 tests (all passing), 5 evidence scenarios. Python 3.12+, FastAPI, PostgreSQL 16, MIT license. Part of the LICITRA Technical Report Series. Companion report: LICITRA-TR-2026-01 (DOI: 10.5281/zenodo.18843032).
Cited by 0Open access
NARENDRA KUMAR NUTALAPATI · Zenodo (CERN European Organization for Nuclear Research) · 2026
Reference implementation of LICITRA-MMR, an open-source ledger primitive that combines a Merkle Mountain Range (MMR) data structure with per-organization epoch anchoring, a versioned canonical JSON specification, and an atomic two-phase commit pipeline for cryptographic audit integrity in agentic AI systems. Contains: MMR construction module, canonical JSON serializer, two-phase commit pipeline, epoch chaining, inclusion proof generation, 11 tests (all passing), 5 evidence scenarios. Python 3.12+, FastAPI, PostgreSQL 16, MIT license. Part of the LICITRA Technical Report Series. Companion report: LICITRA-TR-2026-01 (DOI: 10.5281/zenodo.18843032).
Cited by 0Open access
Nylund, William · Doria (University of Helsinki) · 2023
Microservice architectures promise frequent and low-risk deployments, high scalability and flexible technologies. Microservices are independently deployed units of software modeled around a business domain, collectively forming a complete software application. Services should maintain their own data in order to keep services decoupled, leading to cases where transactions span several databases, which is one of many challenges in microservice architectures. This thesis compares two methods for managing transactions in microservice architecture: the two-phase commit and the saga pattern. A prototype e-commerce system is implemented using a microservice architecture consisting of three services with their own databases. Each service contributes to fulfilling an order, requiring extra care to maintain data consistency in the system. The two-phase commit and the saga pattern are evaluated on their performance, scalability, complexity, availability and consistency. The evaluation shows that the two-phase commit could be better in edge cases that require strong consistency. However, the saga pattern is the superior choice in most use cases, with its ability to operate well under heavy loads and high availability in the case of a network partition.
Cited by 0Open access
Austen Mcdonald, Brian D. Carlstrom, Jaewoong Chung et al. · 2008
...... As multicore chips become ubiquitous, the need to provide architectural support for practical parallel programming is reaching critical. Conventional lock-based concurrency control techniques are difficult to use, requiring the programmer to navigate through the minefield of coarseversus fine-grained locks, deadlock, livelock, lock convoying, and priority inversion. This explicit management of concurrency is beyond the reach of the average programmer, threatening to waste the additional parallelism available with multicore architectures. A promising solution to this dilemma is transactional memory (TM). 1 With TM, programmers declare code segments that must execute atomically and in isolation from all other code. Concurrency control becomes largely the system’s responsibility, with no additional programming burden. The system monitors transactions that are executing optimistically in parallel, detects accesses to shared data that violate atomicity, and potentially aborts and reexecutes some transactions to restore atomicity. Several TM implementation proposals advocate using hardware, software, or
Cited by 0
Allison Shapiro, Scott T. Grafton · bioRxiv (Cold Spring Harbor Laboratory) · 2019
Abstract Two fundamental goals of decision making are to select actions that maximize rewards while minimizing costs and to have strong confidence in the accuracy of a judgment. Neural signatures of these two forms of value: the subjective value (SV) of choice alternatives and the value of the judgment (confidence), have both been observed in ventromedial prefrontal cortex (vmPFC). However, the relationship between these dual value signals and their relative time courses are unknown. We recorded fMRI while 28 men and women performed a two-phase Ap-Av task with mixed-outcomes of monetary rewards paired with painful shock stimuli. Neural responses were measured during offer valuation (offer phase) and choice valuation (commit phase) and analyzed with respect to observed decision outcomes, model-estimated SV and confidence. During the offer phase, vmPFC tracked SV and decision outcomes, but it not confidence. During the commit phase, vmPFC tracked confidence, computed as the quadratic extension of SV, but it bore no significant relationship with the offer valuation itself, nor the decision. In fact, vmPFC responses from the commit phase were selective for confidence even for rejected offers, wherein confidence and SV were inversely related. Conversely, activation of the cognitive control network, including within lateral prefrontal cortex (lPFC) and dorsal anterior cingulate cortex (dACC) was associated with ambivalence, during both the offer and commit phases. Taken together, our results reveal complementary representations in vmPFC during value-based decision making that temporally dissociate such that offer valuation (SV) emerges before decision valuation (confidence).
Cited by 3Open access
P. Kavitha Nagaraj · 1998
Database systems are among the most important applications of computer technology. They provide versatile methods for storing and dealing with large volumes of data. A Distributed database is a database where different objects may be stored at different sites and where the users may issue transactions at any site in the system. Distributed database systems implement a transaction commit protocol to ensure transaction atomicity. A commit protocol guarantees the uniform commitment of distributed transaction execution, that is, it ensures that all the participating sites agree on the final transaction outcome (commit or abort). Most importantly, this guarantee is valid even in the presence of site or network failures. Over the last two decades, a variety of commit protocols have been proposed by database researchers. These include the classical two phase commit (2PC) protocol, its variations such as Presumed Commit and Presumed Abort which have the 2PC protocol streamlined so as to reduce the number of messages exchanged, and then there is three phase commit protocol which is an improved version of 2PC which helps prevent blocking at the expense of extra messages and logging of records. These commit protocols typically require exchange of multiple messages, in multiple phases, between the participating sites where the distributed transaction executed. In addition, several log records are generated, some of which have to be "forced", that is, flushed to disk immediately. Due to these costs, commit processing can result in a significant increase in transaction execution times, and therefore the choice of commit protocol becomes an important decision in the design of a distributed database system. Real-time
Cited by 0
Hatem A. Mahmoud, Faisal Nawab, Alexander Pucher et al. · Proceedings of the VLDB Endowment · 2013
Web service providers have been using NoSQL datastores to provide scalability and availability for globally distributed data at the cost of sacrificing transactional guarantees. Recently, major web service providers like Google have moved towards building storage systems that provide ACID transactional guarantees for globally distributed data. For example, the newly published system, Spanner, uses Two-Phase Commit and Two-Phase Locking to provide atomicity and isolation for globally distributed data, running on top of Paxos to provide fault-tolerant log replication. We show in this paper that it is possible to provide the same ACID transactional guarantees for multi-datacenter databases with fewer cross-datacenter communication trips, compared to replicated logging. Instead of replicating the transactional log, we replicate the commit operation itself, by running Two-Phase Commit multiple times in different datacenters and using Paxos to reach consensus among datacenters as to whether the transaction should commit. Doing so not only replaces several inter-datacenter communication trips with intra-datacenter communication trips, but also allows us to integrate atomic commitment and isolation protocols with consistent replication protocols to further reduce the number of cross-datacenter communication trips needed for consistent replication; for example, by eliminating the need for an election phase in Paxos. We analyze our approach in terms of communication trips to compare it against the log replication approach, then we conduct an extensive experimental study to compare the performance and scalability of both approaches under various multi-datacenter setups.
Cited by 84
Loc Bui, Ramesh Johari, Shie Mannor · 2016
We consider a multi-armed bandit problem where there are two phases. The first phase is an experimentation phase where the decision maker is free to explore multiple options. In the second phase the decision maker has to commit to one of the arms and stick with it. Cost is incurred during both phases with a higher cost during the experimentation phase. We analyze the regret in this setup, and both propose algorithms and provide upper and lower bounds that depend on the ratio of the duration of the experimentation phase to the duration of the commitment phase. Our analysis reveals that if given the choice, it is optimal to experiment Θ(lnT) steps and then commit, where T is the time horizon. 1
Cited by 0
M. Shahza, Dr. C. Bamford, Prof Taleb-bendiab et al. · 2015
Abstract-Commit protocols are used to ensure transaction atomicity. The two-phase commit (2PC) is a standard commit protocol used in many commercial database systems. Attempts to reduce the cost of commitment have resulted in many variants of 2PC. These are all blocking protocols. But in other protocols when the blocking issue is addressed the result is an increase in the transaction commitment cost. In this paper we propose a design for a non-blocking commit protocol which can survive coordinator failure, yet which does not increase the execution costs in comparison with 2PC, even reducing them in highly reliable environments where failure is not the issue. I.
Cited by 0
Chad Carr, Jennifer Gray, Lane Moore · OSTI OAI (U.S. Department of Energy Office of Scientific and Technical Information) · 1982
The authors describe a method for resolving recoverable units of work in a system including a coordinator node and one or more participant nodes, where a participant node is in an in-doubt state during two-phase commit processing between a prepare request and a commit request from the coordinator node, and when in the in-doubt state has one or more resources in a locked state.
Cited by 0
Yousef J. Al-houmaily, Panos K. Chrysanthis · 1996
The implicit yes--vote commit protocol (IYV), proposed for future gigabit--networked distributed databases, reduces the time required to commit a distributed transaction at the expense of independent recovery of failed participant sites. In this paper, we propose a novel coordination scheme for IYV that reduces the window of vulnerability to blocking and minimizes the time required for the sites to become operational after a failure. The new scheme combines the delegation of commitment technique with a timestamp synchronization mechanism. Although this new scheme incurs extra coordination messages and log writes, it enhances the performance of IYV during recovery in the presence of less reliable sites while still maintaining the cost of commit processing during normal processing below that of twophase commit and its other well known variants. Keywords: Two--phase commit, atomic commit protocols, distributed transactions, forward recovery. 1 Introduction In a distributed database sys...
Cited by 0
Dan Duchamp · Columbia Academic Commons (Columbia University) · 1989
The basic two-phase distributed commitment protocol as described in [3, pp. 381-382] can be optimized so that a subordinate update site drops its locks more promptly and makes one fewer log force per transaction. The optimization applies as well to the variations of two-phase commitment (i.e., hierarchical, presumed commit. and presumed abort) described in the same paper.
Cited by 0Open access
Alexander Thomson, Daniel J. Abadi · Proceedings of the VLDB Endowment · 2010
Replication is a widely used method for achieving high availability in database systems. Due to the nondeterminism inherent in traditional concurrency control schemes, however, special care must be taken to ensure that replicas don't diverge. Log shipping, eager commit protocols, and lazy synchronization protocols are well-understood methods for safely replicating databases, but each comes with its own cost in availability, performance, or consistency. In this paper, we propose a distributed database system which combines a simple deadlock avoidance technique with concurrency control schemes that guarantee equivalence to a predetermined serial ordering of transactions. This effectively removes all nondeterminism from typical OLTP workloads, allowing active replication with no synchronization overhead whatsoever. Further, our system eliminates the requirement for two-phase commit for any kind of distributed transaction, even across multiple nodes within the same replica. By eschewing deadlock detection and two-phase commit, our system under many workloads outperforms traditional systems that allow nondeterministic transaction reordering.
Cited by 147
Zihao Zhang, Huiqi Hu, Xuan Zhou et al. · Proceedings of the VLDB Endowment · 2024
In a geo-distributed database, data shards and their respective replicas are deployed in distinct datacenters across multiple regions, enabling regional-level disaster recovery and the ability to serve global users locally. However, transaction processing in geo-distributed databases requires multiple cross-region communications, especially during the commit phase, which can significantly impact system performance. To optimize the performance of geo-distributed transactions, we propose Decentralized Two-phase Commit (D2PC), a new transaction commit protocol aiming to minimize the negative impact of cross-region communication. In D2PC, we employ multiple co-coordinators that perform commit coordination in parallel. Each co-coordinator is responsible for collecting 2PC votes and making a PreCommit decision in its local region. This approach allows for the concurrent invocation of multiple cross-region network round trips, and each region can end its concurrency control locally before replication is complete, thus significantly reducing the chances of blocking and enhancing system concurrency. Moreover, we propose the bypass leader replication reply method, leveraging decentralized co-coordinators to bypass the leader for message transmission, thereby reducing the commit latency. Experimental results have demonstrated that D2PC can reduce commit latency by 43% and improve throughput by up to 2.43 × compared to the geo-distributed transaction processing methods based on 2PC.
Cited by 2
I. Stanoi, Divyakant Agrawal, Amr El Abbadi · 1998
In this paper, we explore the use of the simple variants of broadcast protocols for managing replicated databases. In particular, we start with the simplest broadcast primitive, the reliable broadcast protocol, and show how it can be used to ensure correct transaction execution. The protocol is simple, and has several advantages, including prevention of deadlocks. However, it requires a two-phase commitment protocol for ensuring correctness. We then develop a second protocol that uses causal broadcast and avoids the overhead of two-phase commit by exploiting the causal delivery properties of the broadcast primitives to implicitly collect the relevant information used in two-phase commit. Finally, we present a protocol that employs atomic broadcast and completely eliminates the need for acknowledgements during transaction commitment. 1 Introduction Recently there has been increasing interest in the development of broadcast protocols for disseminating information in distributed systems ...
Cited by 1
Tianyang Li, Jin Wu, Songyan Ji et al. · 2025
HotStuff stands out as the first Byzantine Fault Tolerant (BFT) state machine replication protocol to achieve linear communication complexity while maintaining optimistic responsiveness and fairness. However, it is required at least three phases to commit a block, which leads to high latency. Recent studies have focused on developing two-phase variants of HotStuff to reduce its block commitment latency. Nonetheless, two-phase HotStuff suffers from the liveness issue, forcing these protocols to sacrifice one of the three fundamental properties of HotStuff when addressing this problem, thereby facing a trade-off among these properties. In this paper, we introduce a novel protocol, Harmonia, which, to the best of our knowledge, is the first BFT protocol to simultaneously achieve linear communication complexity, optimistic responsiveness, fairness, and the minimum commit latency of two phases. Harmonia overcomes the liveness issue of two-phase HotStuff through its specialized block unlocking mechanism while preserving all the original properties of HotStuff. Experimental results show that Harmonia consistently outperforms HotStuff across various metrics.
Cited by 0
Omar I. Al-Bataineh, Mark Reynolds · arXiv (Cornell University) · 2012
The timed-based automata model, introduced by Alur and Dill, provides a\nuseful formalism for describing real-time systems. Over the last two decades,\nseveral dense-time model checking tools have been developed based on that\nmodel. The paper considers the verification of real-time distributed commit\nprotocols using dense-time model checking technology. More precisely, we model\nand verify the well-known timed two phase commit protocol in three different\nstate-of-the-art real-time model checkers: UPPAAL, Rabbit, and RED, and compare\nthe results.\n
Cited by 0Open access
Fan Zhi-hua, Jin Xiong, Jie Ma · 2004
Distributed metadata servers are required for cluster file system's scalability. However, how to distribute the file system metadata among multiple metadata servers and how to make the file system reliable in case of server failures are two difficult problem. We present a journal-based failure-recovery mechanism for distributed metadata servers in the dawning cluster file system-DCFS2. The DCFS2 metadata protocol exploits a modified two-phase commit protocol which ensures consistent metadata updates on multiple metadata servers even in case of one server's failure. We focus on the logging policy and concurrent control policy for metadata updates, and the failure recovery policy. The DCFS2 metadata protocol is compared with the two phase commit protocol and some virtues are shown. Some results of performance experiments on our system are also presented.
Cited by 5