Replicated Finite State Machine Lock Service
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed systems, shared resources can enter inconsistent states due to concurrent accesses by multiple readers or writers, leading to errors if not properly controlled, and existing lock management systems struggle with handling lock abandonment and failure detection efficiently.
Innovation Solution
A distributed lock management service using a replicated finite state machine approach that categorizes lock requests based on client instance identifiers, replicates state across partitions, and employs abandonment timers and failure detection to manage lock abandonment and ensure consistency, allowing for high availability and scalability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a distributed lock manager provides synchronized access control for shared resources, then data integrity and consistency are improved, but system complexity and overhead increase
Solution Approach 1:
The lock manager is divided into multiple independent partitions that can operate autonomously. Each partition handles a specific subset of lock requests and maintains its own state, reducing the complexity burden on any single node while ensuring overall system reliability through distributed consensus.
Solution Approach 2:
The patent implements replicated finite state machines across multiple partitions, where each partition maintains a copy of the lock management state. This replication allows for fault tolerance and high availability while distributing the complexity management across multiple identical units.
2Reliability
If the lock service uses a replicated finite state machine approach, then high availability and scalability are improved, but state replication overhead and consistency maintenance difficulty increase
Solution Approach 1:
The system dynamically determines which partitions to replicate state to based on current operational conditions, client requests, and partition health status. This dynamic replication strategy optimizes the balance between availability and replication overhead by activating replication only when necessary.
Solution Approach 2:
The patent changes the replication parameter from static (all-or-nothing) to selective based on finite state machine transitions. State is replicated only when transitioning between significant states (e.g., lock granted, lock released), reducing unnecessary replication traffic while maintaining consistency.
3Reliability
If the system handles lock abandonment through abandonment timers and failure detection, then reliability is improved, but detection accuracy and response time requirements increase
Solution Approach 1:
The system performs preliminary actions by continuously monitoring client health and proactively detecting failures before they manifest as actual lock abandonment. The abandonment timer is pre-configured with appropriate thresholds that balance detection accuracy with timely response, allowing the system to prepare for failure scenarios in advance.
Solution Approach 2:
The patent implements multiple feedback mechanisms including abandonment timers, failure detectors, and client heartbeat monitoring. These feedback loops continuously assess client status and trigger appropriate responses (lock release, lock retention, or error) based on detected conditions, ensuring reliable failure detection without excessive delays.
Data Source
AI summary
A replicated finite state machine lock service facilitates resource sharing in a distributed system. A lock request from a client identifies a resource and a lock-mode, and requests a leaseless lock on the resource. The service uses client instance identifiers to categorize requests as duplicate, stale, abandoned, or actionable. A lock may be abandoned when a client holding the lock goes down. After a per-client abandonment timer expires, the lock service may treat any exclusive lock granted to the client as abandoned, and treat any non-exclusive lock granted to the client as unlocked. The service tries to notify a lock-holding client if another client requests the same lock, and treats the lock as abandoned if the notification attempt fails. An abandoned read lock is granted to a different client on request. An abandoned write lock is granted or refused depending on whether the requesting client accepts abandoned write locks.


