https://github.com/bsm/accord
distlock distributed-systems golang processing
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bsm/accord
- Owner: bsm
- License: apache-2.0
- Created: 2019-04-16T16:42:49.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T00:35:35.000Z (about 1 year ago)
- Last Synced: 2025-03-22T19:02:28.656Z (about 1 year ago)
- Topics: distlock, distributed-systems, golang, processing
- Language: Go
- Size: 200 KB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Accord
[](https://godoc.org/github.com/bsm/accord)
[](https://github.com/bsm/accord/actions/workflows/test.yml)
[](https://opensource.org/licenses/Apache-2.0)
Fast and efficient coordination of distributed processes.
Server and client implementation in [Go](https://golang.org/) on top of the [gRPC](https://grpc.io/) framework.
## Use Case
Imagine you are processing files within a directory or bucket, you would want to coordinate your workers
to pick a file each, lock it for the duration of the processing and then mark it as done once finished so
it's not picked up by another worker again.
## Architecture
+------------+ +------------+ +--------------+
| | | | | |
| WORKER | -gRPC-> | SERVER | --> | BACKEND |
| Client | <------ | | <-- | PostgreSQL |
| | | | | |
+------------+ +------------+ +--------------+
- Clients are connected to (a cluster of) Accord Servers and communicate via gRPC.
- Servers are using a pluggable backend (currently, PostgreSQL only) to coordinate state.
- Clients maintain a local state cache to avoid hammering the server/backends.
## Documentation
Please see the [API documentation](https://godoc.org/github.com/bsm/accord) for
package and API descriptions and examples.
## Backends
- [PostgreSQL](https://godoc.org/github.com/bsm/accord/backend/postgres) - requires version >= 9.5.
- [Mock](https://godoc.org/github.com/bsm/accord/backend/mock) - in-memory backend, for testing only.
- [Direct](https://godoc.org/github.com/bsm/accord/backend/direct) - direct allows to connect clients directy a backend, bypassing the server. Use at your own risk!