An Erlang state monad with deterministic conflict resolution for eventually consistent systems like Riak.
Statebox is an Erlang library that implements a state monad with automated conflict resolution capabilities. It provides a data structure that wraps a current value with an event queue, enabling deterministic merging of concurrent state changes in eventually consistent distributed systems like Riak.
Erlang developers building distributed applications with Riak or other eventually consistent databases who need reliable conflict resolution mechanisms.
Developers choose Statebox for its deterministic conflict resolution, production-proven reliability, and mathematical guarantees about operation safety, making it ideal for maintaining consistency in distributed Erlang systems.
Erlang state "monad" with merge/conflict-resolution capabilities. Useful for Riak.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Merges statebox instances by replaying merged event queues in timestamp order, ensuring consistent outcomes as demonstrated in the theory section with examples like ordsets merging.
Used in production at Mochi Media for backend services, indicating real-world testing and stability in distributed environments.
Enforces mathematical properties like idempotence and type preservation on operations, preventing unsafe merges and ensuring correctness, as outlined in the op() limitations.
Provides truncate and expire functions to manage event queue size before serialization, reducing overhead in persistent storage scenarios.
Operations must be repeatable and type-preserving, excluding common functions like orddict:update_counter, which limits usability for stateful updates.
Designed specifically for Erlang and eventually consistent systems like Riak, making it unsuitable for cross-platform or other database integrations without significant adaptation.
Requires maintaining and merging event queues, which can grow large and add complexity compared to simpler conflict-resolution approaches, necessitating regular optimizations.