Web Interface for Distributed Transaction System
Keywords:
microservices, distributed transaction, two-phase commit, SAGA.Abstract
This research delves deep into the saga pattern, which proves to be an effective approach for managing local se- quential transactions across distributed microservices. However, the problem of isolation lacking in the saga pattern can result in incorrect commits on databases due to unfinished transactions. To address this issue and further enhance existing solutions like transaction management protocols (e.g., two-phase commit), this study introduces innovative enhancements, namely quota cache and commit-sync service. These enhancements enable specific operations between database layers, effectively preventing invalid or incomplete commitments on the main databases. An experi- mental test was conducted to evaluate and check the effectiveness and performance of a microservices-based e-commerce system, revealing that this novel approach successfully handled both regular scenarios and exceptions, addressing isolation concerns. In the event of service failures, compensation transactions were executed to undo adjustments made solely within the caching layer. After ensuring all processes were correctly completed, the alterations were committed back into the database. Although promising results were observed, further investigation is required for optimization before widespread adoption as an industry- standard approach.