Dynalock: A lease based distributed lock.
Dynalock algorithm supports lease based distributed locking implementations through providers that support a strongly consistent Compare-And-Swap (CAS) operation, or at least the compare-and-set variant and an eventually consistent read operation. For algorithmic details please refer to the README.md file.
You can use this library to cooperatively synchronize access on a conceptual
resource (e.g., pushing an item to a queue). The main data structure we use
to describe the lock is
The generic structure
DistLock accepts a single type parameter
delegate the implementation of the
Locking trait to back-end or storage
driver implementations. As an example, the DynamoDB driver implements the
Locking trait for
Locking trait is an API
contract where driver implementations will implement the Dynalock algorithm for
using the provider's primitives.
Dynalock error type and kinds.
Distributed lock storage providers.
The distributed lock structure that holds all the internal lock state and information.
The Locking trait provides a contractual API that providers implement the Dynalock algorithm using the particular provider's primitives.