← Graph

Sourced

project 16 connections

Experimental Ruby library by Ismael Celis for exploring event-sourcing patterns independently of the web. Core primitives are command and event data structs (commands are intent, events are past facts). A Decider class encapsulates the command lifecycle: a state block initialising state, evolve blocks updating state from each past event, and a command block that, given evolved state plus a new command, checks invariants and emits events. Reactions glue commands together — a reaction observes an event, performs side effects (e.g. calling Stripe) and dispatches the next command (e.g. ConfirmPayment). A Projector superclass consumes events and writes read-models to arbitrary stores (DB, file, Redis, Elasticsearch). Test helpers accept given/when/then specifications over any reactor. The Sourced runtime handles asynchronous distribution, per-partition claim locking (similar to Solid Queue), parallel replay with per-stream ordering, command-event correlation for full workflow tracing (request ID can seed the chain), time-travel state inspection, and a web dashboard to stop/restart/replay reactors and rebuild projections by resetting offsets. Newer versions use Dynamic Consistency Boundaries — events carry attributes and are queried to build virtual streams for each decision rather than being tied to one stream. Prism-based static analysis emits workflow diagrams. Ismael has used Postgres and now SQLite as the store, chosen to simplify dependencies while focusing on patterns.

status
active
license
open-source
language
Ruby
about
Sourced project
Second half of the talk walks through Sourced's primitives and runtime.
about
Sourced project
Specifically about Sourced's concurrency handling (claim mechanism).
about
Sourced project
About Sourced's error/retry/dashboard behaviour.
project Sourced
related_to
Projector concept
Ships a Projector superclass.
project Sourced
related_to
Reactor concept
Reactions are first-class in Sourced.
project Sourced
related_to
New version of Sourced implements DCB-style event querying.
project Sourced
related_to
Event Sourcing concept
A library for exploring event-sourcing patterns in Ruby.
project Sourced
related_to
Decider Pattern concept
Sourced's Decider class implements decide/evolve/react.
project Sourced
related_to
Provides durable execution by design via persisted events.
project Sourced
related_to
Runtime feature correlating commands and resulting events.
project Sourced
related_to
Each decider/projector runs at its own pace as an autonomous service.
project Sourced
uses
Prism tool
Uses the Prism parser to statically analyse the command/event DSL and produce workflow diagrams.
project Sourced
uses
SQLite tool
Ismael's current default event store after switching from Postgres to simplify dependencies.
project Sourced
uses
Ruby LLM tool
The chat-app demo in the talk uses Ruby LLM to talk to an LLM, illustrating multiplayer/real-time for free.
project Cidurial
uses
Sourced project
Cidurial can swap its built-in command store/dispatcher for Sourced's, integrating the web toolkit with the event-sourcing runtime.
person Ismael Celis
works_on
Sourced project
Author of the experimental event-sourcing library.
role: author

Provenance