Locking Microservice for Transaction Exchange Platform
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing transaction exchange platforms face challenges in guaranteeing idempotent transactions across geographically disparate regions due to issues with duplicate data processing, high latency, and performance overhead in consensus protocols, particularly in handling locks and data synchronization across multiple regions.
Innovation Solution
A transaction exchange platform utilizing a streaming data platform and microservices that leverages a consensus protocol only for lock acquisition, employing a local fast write forward system for data access, thereby improving performance and reliability by limiting consensus protocol interactions to unique key writes and storing metadata in a local cache system.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a consensus protocol is used for all read and write transactions to ensure idempotent transactions across regions, then transaction reliability is improved, but system latency and overhead increase significantly
Solution Approach 1:
The patent segments the use of consensus protocol to apply it only to lock acquisition operations rather than all transactions. This selective application maintains transaction reliability for critical locking operations while reducing overall system latency by using faster local storage for non-critical operations.
Solution Approach 2:
The patent implements a local storage system that provides fast read/write operations for most transactions, while using the consensus protocol only where needed for lock management. This creates different quality levels of storage performance in different parts of the system, optimizing both speed and reliability.
2Reliability
If a consensus protocol is used for lock acquisition across regions, then lock reliability is improved, but device complexity increases
Solution Approach 1:
The system architecture is segmented into distinct components: a consensus protocol layer for lock management, a local storage layer for fast data access, and an application layer. This segmentation reduces complexity by clearly defining boundaries and responsibilities of each component.
Solution Approach 2:
The patent introduces an intermediary local storage system that sits between the application and the consensus protocol. This intermediary handles most operations locally, reducing the complexity burden on the consensus protocol while maintaining lock reliability.
3Productivity
If traditional write forward mechanisms like Redis Active-Active are used for cross-region data replication, then data availability is improved, but duplicate processing risks increase
Solution Approach 1:
The patent applies preliminary action by acquiring locks through the consensus protocol before performing write operations. This preliminary locking step ensures that duplicate processing cannot occur during the subsequent fast local write operations, maintaining both speed and reliability.
Solution Approach 2:
The local storage system acts as an intermediary that provides fast write operations while the consensus protocol acts as another intermediary layer that prevents duplicates. This layered intermediary approach resolves the contradiction between speed and duplicate prevention.
Data Source
AI summary
Aspects described herein may relate to a transaction exchange platform using a streaming data platform (SDP) and microservices to process transactions according to review and approval workflows. The transaction exchange platform may receive transactions from origination sources, which may be added to the SDP as transaction objects. As the transactions are processed, the transactions may require access to a resource (e.g., a key value in a database). A microservice processing the transaction may request, from a locking microservice, a lock for the resource. The locking microservice may query a local cache to determine whether a lock exists for the resource. If the local cache determines that no lock exists for resource, the locking mechanism may employ a consensus protocol to obtain a lock for the resource from a plurality of clusters. If consensus is reached, a lock for the resource may be granted to the requesting microservice.


