Server Resource Locking via Sequence Numbers and Provisional Bits
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed network systems face inefficiencies due to constant communication between servers and global locking services, which consume bandwidth and require persistent state management, leading to high loads and additional expenses.
Innovation Solution
A server system that uses a resource table with sequence numbers and provisional bits to manage lock access without persistent state, allowing provisional rejections and sequence number updates to verify lock validity, reducing direct communication with the global locking service.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If constant communication between server and global locking service is implemented, then lock validation reliability is improved, but bandwidth consumption increases and system load increases
Solution Approach 1:
The server performs preliminary validation by checking sequence numbers against stored snapshots before contacting the locking service. This preliminary action filters out obviously invalid requests, reducing the need for constant communication with the locking service while maintaining validation reliability.
Solution Approach 2:
Sequence numbers and snapshots act as intermediaries between the server and locking service. Instead of direct constant communication, the server uses these intermediaries to validate locks locally, reducing communication overhead while maintaining reliability through periodic verification with the locking service.
2Reliability
If constant communication between server and global locking service is implemented, then lock validation reliability is improved, but system load on locking service increases
Solution Approach 1:
The server performs preliminary validation by checking sequence numbers against stored snapshots before contacting the locking service. This preliminary action filters out obviously invalid requests, reducing the need for constant communication with the locking service while maintaining validation reliability.
Solution Approach 2:
The server performs self-validation using stored snapshots and sequence numbers, reducing dependency on the locking service. This self-service approach allows the server to independently validate most lock requests, significantly reducing the load on the locking service while maintaining reliability through periodic verification.
3Loss of energy
If persistent state is stored to avoid contacting locking service on restart, then communication overhead is reduced, but memory requirements increase and system complexity increases
Solution Approach 1:
The server uses volatile memory for storing snapshots instead of persistent storage. These snapshots are discarded when the server restarts and automatically re-synchronized from the locking service. This approach avoids the complexity of persistent state management while keeping communication overhead low during normal operation.
Solution Approach 2:
The system changes the state persistence parameter from persistent (non-volatile) to transient (volatile). By accepting that snapshots will be lost on restart and automatically re-synchronizing, the system simplifies memory management and reduces complexity while maintaining low communication overhead during operational periods.
4Reliability
If clock synchronization is implemented for lease-based locking, then lock management reliability is improved, but communication overhead increases and clock skew issues persist
Solution Approach 1:
The system replaces the mechanical clock synchronization mechanism with a logical sequence number system. Instead of relying on synchronized clocks and time-based leases, the server uses monotonically increasing sequence numbers from the locking service to validate locks. This substitution eliminates clock skew issues and reduces communication overhead for time synchronization.
Data Source
AI summary
A server system includes a processor and a data structure having an entry for a resource, the entry including a first sequence number. The server has communication procedures for receiving a request from a client to access the resource, where the request includes a second sequence number obtained from a service, and a resource request handling program. Upon receiving the request, the resource request handling program determines whether the server has any record of having previously received a request to access the resource. If not, the server returns a provisional rejection to the client, requiring the client to verify that it holds a lock on the specified resource. A provisional bit in the entry is initially set to indicate that the resource has not been accessed since the system was last initialized. The provisional bit is reset when a request to access the resource is granted.


