Maestro v0.0.2 API Reference
Modules
Traditional domain entities are referred to as aggregates in the literature. The goal of this library is to greatly simplify the process of implementing a event sourcing application by owning the flow of non-domain data (i.e. commands, events, and snapshots) to allow you to focus on the business logic of evaluating commands and applying events to your domain objects
All aggregate roots, no matter how many different kinds you may have, are managed by a single supervisor/registry (for now). Given that aggregates are independently configurable and extensible, the need for a 1:1 on supervisors per aggregate is a premature optimization. Furthermore, aggregate IDs are HLC timestamps and are thus unique even across aggregates
Simple supervisor that ensures that should the registry or the aggregate supervisor go down, things are brought back up cleanly
Commands are the primary way clients express a desire to change the system. In Maestro, commands are always executed within the context of an aggregate in a consistent manner
Events are the building block of our society. Behave accordingly
aggregate roots can commit state that has been computed from the application of events. this is useful if events are expensive to apply or if there are a sufficiently large number of events that replaying from sequence=1 would be impractical
Concise API for events and snapshots. Requires a Repo to operate
Defines the minimal API for a well-behaved storage implementation
Agent-based implementation of the event/snapshot storage mechanism
Ecto+Postgres implementation of the storage mechanism