753b935b52
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
---|---|---|
.github | ||
proto | ||
src | ||
.gitignore | ||
LICENSE | ||
pom.xml | ||
README.md | ||
rebar.config | ||
rebar.lock | ||
renovate.json |
bender-proto
An external identifier binding service protocol. Implemented by bender.
What?
Glad you asked. This protocol describes a service which deals with binding abstraction. A binding ties some external identifier (e.g. identifier of some object or process in some third-party system) with a single uniform and predictable internal identifier, and does this uniquely: there should no more than one such binding for each external identifier.
Why?
-
You want to guarantee idempotency of your system.
You should tell your clients to include some form of external identifier or idempotency key when interacting with your system's API. This service will make sure that you'll end up with the same internal identifier, no matter how many identical requests you end up receiving.
-
...And also you want predictable identifiers.
In other words you want to have, for example, plain 64-bit counter for an identifier internally, no matter how diverse your clients' identifiers are.
-
...And also you want to spot conflicting requests with same external identifiers.
For that you might compute, for example, some stable hash of the request data and associate it with a binding as a context. Service guarantees that only the first actor who actually creates a binding (the winner) will have its context persisted. Other actors will see winner's context in service responses.