https://github.com/a8m/lease
Generic lease implementation using DynamoDB
https://github.com/a8m/lease
distributed-systems dynamo dynamodb go kcl lease
Last synced: 9 months ago
JSON representation
Generic lease implementation using DynamoDB
- Host: GitHub
- URL: https://github.com/a8m/lease
- Owner: a8m
- License: mit
- Created: 2016-07-16T20:04:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-03T17:22:58.000Z (over 8 years ago)
- Last Synced: 2025-04-11T19:21:49.751Z (about 1 year ago)
- Topics: distributed-systems, dynamo, dynamodb, go, kcl, lease
- Language: Go
- Homepage:
- Size: 587 KB
- Stars: 19
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lease [![Build status][travis-image]][travis-url] [![License][license-image]][license-url] [![GoDoc][godoc-img]][godoc-url]
A generic leasing implementation of the [Amazon-KCL.lease][kcl.lease] package. ideal for manage
and partition work across a fleet of workers.

### What is a Lease ?
Lease type contains data pertianing to a lease.
Distributed systems may use leases to partition work across a fleet of workers.
Each unit of work (identified by a leaseKey) has a corresponding Lease.
Every worker will contend for all leases - only one worker will successfully take each one.
The worker should hold the lease until it is ready to stop processing the corresponding unit of work,
or until it fails.
When the worker stops holding the lease, another worker will take and hold the lease.
To get started, see the [examples][examples]
### License
MIT
[examples]: https://github.com/a8m/lease/tree/master/_examples
[kcl.lease]: https://github.com/awslabs/amazon-kinesis-client/tree/master/src/main/java/com/amazonaws/services/kinesis/leases
[godoc-url]: https://godoc.org/github.com/a8m/lease
[godoc-img]: https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square
[travis-url]: https://travis-ci.org/a8m/lease
[travis-image]: https://img.shields.io/travis/a8m/lease.svg?style=flat-square
[license-url]: LICENSE
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square