Lucky is a Golang implementation of a distributed lock, which is used in distributed systems to ensure that only one process can access a critical section at a time. The critical section is the code that needs to be executed by only one process at a time.
Distributed locking is a common problem in distributed systems, and there are many solutions and algorithms to handle it. Most of them use third-party tools such as ZooKeeper, Redis, etc. However, the goal of Lucky is to provide a lightweight and simple library that solves this problem without any external dependencies.
Resources that were referred to during the development of Lucky include:
- Distributed Locks with Redis
- How to do distributed locking
- Is Redlock safe?
- Everything I know about distributed locks
- Distributed Locks are Dead; Long Live Distributed Locks!
- The Technical Practice of Distributed Locks in a Storage System
- Control concurrency for shared resources in distributed systems with DLM (Distributed Lock Manager)
The current roadmap for Lucky includes:
- Implementing a module using the RedLock algorithm and Redis as a backend
- Implementing a module using ZooKeeper as a backend
- Implementing a module using etcd as a backend
- Implementing a module using MySQL as a backend
- Implementing a module using PostgreSQL as a backend
- Implementing a module using MongoDB as a backend
- Implementing a module using a simple file as a backend
- Implementing a module using simple in-memory storage as a backend
Contributions to Lucky are always welcome! Please feel free to open issues or submit pull requests to help improve the project.
Lucky is licensed under the MIT License.