Context: Concurrent objects with asynchronous messaging are an increasingly popular way to structure highly available, high performance, large-scale software systems. To ensure data-consistency and support synchronization between objects such systems often use distributed transactions with Two-Phase Locking (2pl) for concurrency control and Two-Phase commit (2pc) as atomic commitment protocol.

Inquiry: In highly available, high-throughput systems, such as large banking infrastructure, however, 2pl becomes a bottleneck when objects are highly contended, when an object is queuing a lot of messages because of locking.

Approach: In this paper we introduce Path-Sensitive Atomic Commit (psac) to address this situation. We start from message handlers (or methods), which are decorated with pre- and post-conditions, describing their guards and effect.

Knowledge: This allows the psac lock mechanism to check whether the effect of two incoming messages at the same time are independent, and to avoid locking if this is the case. As a result, more messages are directly accepted or rejected, and higher overall throughput is obtained.

Grounding: We have implemented psac for a state machine-based DSL called Rebel, on top of a runtime based on the Akka actor framework. Our performance evaluation shows that psac exhibits the same scalability and latency characteristics as standard 2pl/2pc, and obtains up to 1.8 times median higher throughput in congested scenarios.

Importance: We believe psac is a step towards enabling organizations to build scalable distributed applications, even if their consistency requirements are not embarrassingly parallel.

ING Bank
doi.org/10.22152/programming-journal.org/2021/5/3
The Art, Science, and Engineering of Programming
Software Analysis and Transformation

Soethout, T.M, van der Storm, T, & Vinju, J.J. (2021). Path-Sensitive Atomic Commit: Local Coordination Avoidance for Distributed Transactions. The Art, Science, and Engineering of Programming, 5(1). doi:10.22152/programming-journal.org/2021/5/3