{"id":29617044,"url":"https://github.com/mitchs-dev/dislo","last_synced_at":"2025-07-21T01:32:27.726Z","repository":{"id":304887468,"uuid":"1020431849","full_name":"mitchs-dev/dislo","owner":"mitchs-dev","description":"Dislo is a distributed lock management system implemented in Go, providing a gRPC API for safely coordinating access to shared resources across multiple clients and instances. It supports concurrent locking, queueing, and namespace isolation, making it suitable for distributed systems and microservices architectures.","archived":false,"fork":false,"pushed_at":"2025-07-16T11:55:05.000Z","size":71,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T20:18:29.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchs-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-15T21:29:52.000Z","updated_at":"2025-07-16T10:36:04.000Z","dependencies_parsed_at":"2025-07-17T02:42:55.640Z","dependency_job_id":"0ec3722c-0048-43c6-9f36-44954df53de9","html_url":"https://github.com/mitchs-dev/dislo","commit_stats":null,"previous_names":["mitchs-dev/dislo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mitchs-dev/dislo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fdislo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fdislo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fdislo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fdislo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchs-dev","download_url":"https://codeload.github.com/mitchs-dev/dislo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchs-dev%2Fdislo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266226341,"owners_count":23895690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-21T01:32:25.765Z","updated_at":"2025-07-21T01:32:27.719Z","avatar_url":"https://github.com/mitchs-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dislo: Distributed Lock Service\n\nDislo is a distributed lock management system implemented in Go, providing a gRPC API for safely coordinating access to shared resources across multiple clients and instances. It supports concurrent locking, queueing, and namespace isolation, making it suitable for distributed systems and microservices architectures.\n\n## Features\n\n- **Distributed Locking:** Acquire and release locks on named resources across multiple clients and instances.\n- **Namespaces \u0026 Instances:** Organize locks by namespaces and instances for multi-tenant or sharded environments.\n- **Queue Management:** Clients are queued for locks, ensuring fair access and preventing race conditions.\n- **gRPC API:** Well-defined protocol buffer API for interoperability.\n- **Configurable:** Flexible configuration via JSON or YAML files.\n- **Logging:** Structured logging with configurable formats (JSON or text).\n\n## Planned Features\n\n- **Cluster Mode:** Cluster mode will provide dislo with the ability to scale based on demands to ensure that locks are available no matter the size of the workloads.\n- **Persistence:** Enable your lock statuses to persist through restarts\n- **Authentication**: Lightweight client authentication while still maintaining maximum performance.\n- **Additional SDK Language Support**: Enabling Python, NodeJS, and other langauges to use dislo.\n\n## Security\n\nSee [SECURITY.md](SECURITY.md) for more details on security practices and reporting vulnerabilities.\n\n### Authentication and Encryption\n\nDislo is designed for internal use within trusted networks. It does not implement authentication or encryption by default.\n\nFor production use, consider deploying Dislo behind a secure network layer (e.g., VPN, TLS) and implement your own authentication and authorization mechanisms.\n\n\u003e [!note]\n\u003e Client authentation is a planned feature. However, performance remains a priority for the dislo project.\n\n## Support\n\nSee [SUPPORT.md](SUPPORT.md) for support options and how to get help.\n\n### Client SDK Languages\n\nThe following languages are supports for the client SDK: \n\n- Go\n\n\u003e [!note]\n\u003e While the languages above are the only supported SDK languages, you can still use the `dislo.proto` file to generate your own files to intereact with dislo. However, the dislo contributors will **not provide support for 3rd-party scripts, applications, etc**. Contributors _will_ provide support for the `dislo.proto` file, however.\n\n## Getting Started\n\n### Prerequisites\n\n- Go 1.16 or later\n- [protoc](https://grpc.io/docs/protoc-installation/) (for regenerating gRPC code)\n- Docker (optional, for running with `docker-compose`)\n\n### Installation\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/yourusername/dislo.git\n   cd dislo\n   ```\n\n2. **Build the project:**\n   ```sh\n   cd app\n   go build -o dislo ./cmd\n   ```\n\n3. **(Optional) Generate gRPC code:**\n   ```sh\n   cd proto\n   ./proto.sh\n   ```\n\n## Configuration\n\n- The main configuration is located in [`internal/configuration/default.json`](internal/configuration/default.json).\n- You can override settings by providing your own configuration file, though, this is optional.\n- Key configuration options include server host/port, instances, namespaces, and cluster settings.\n\n## Running the Server\n\n### Using Go\n\n```sh\ncd app\ngo run ./cmd/main.go\n```\n\n### Using Docker Compose\n\n```sh\ndocker-compose up --build\n```\n\nThe server will start and listen on the configured host and port.\n\n\n## gRPC API\n\nThe API is defined in [`proto/dislo.proto`](proto/dislo.proto). Main RPCs:\n\n- `Lock(Request) returns (Response)`\n- `Unlock(Request) returns (Response)`\n- `Create(Request) returns (Response)`\n- `Delete(Request) returns (Response)`\n- `Status(Request) returns (Response)`\n- `List(Request) returns (Response)`\n\nSee the [generated Go code](pkg/generated/dislo/dislo.pb.go) for message and enum details.\n\n\n## Example Client\n\nAn example Go client is provided in [`example/client/main.go`](example/client/main.go). It demonstrates:\n\n- Connecting to the Dislo server\n- Acquiring and releasing locks\n- Handling lock contention and queueing\n\nTo run the example client:\n\n```sh\ncd example/client\ngo run main.go\n```\n\n## Development\n\n- **Regenerate gRPC code:**  \n  Run `./proto/proto.sh` from the `proto` directory after modifying `dislo.proto`.\n- **Configuration:**  \n  Create your own configuration file in YAML or JSON. You can use the [default configuration](internal/configuration/default.json) as a template. If no configuration file is given, the default configuration will be used.\n- **Cluster Mode:**  \n  Cluster mode is planned but not yet implemented. The server currently runs in single-node mode.\n\n## Contributing\n\nContributions are welcome! Please open issues or submit pull requests for improvements or new features.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing to Dislo.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchs-dev%2Fdislo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchs-dev%2Fdislo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchs-dev%2Fdislo/lists"}