← Graph

Event Sourcing and Actor model in Ruby

talk 25 connections

Ismael Celis's wroclove.rb 2026 single-speaker talk, originally submitted as 'Event Sourcing and the Actor Model in Ruby' and renamed before delivery to 'Building Reactive Systems with Ruby and Event Sourcing' because his experimentation had moved away from actors. Presents two conceptual issues with typical web development — the 'model depth' issue (entity-relationship modelling producing ever more coupled graphs) and the 'execution context' issue (artificial split between controllers and background jobs) — then argues for modelling around commands and events instead. Introduces a donations-app demo (campaigns, donations, notifications, email-verification workflow, payment processing) and walks through two experimental Ruby libraries he is building. Cidurial: a Rack app on Falcon with command structs (typed data objects), a DSL for command-handler blocks, Phlex-based page classes that subscribe to commands, and a Datastar-powered SSE connection that morphs server-rendered HTML patches into the DOM. Uses fiber-based asynchronous worker fibers inside Falcon to pick up commands from a store, run handlers and publish to a pub/sub interface, yielding CQRS and real-time multiplayer/streaming UIs with Brotli-compressed SSE (>80% ratios on HTML). Demos include a tap-card donation, a Ruby-LLM chat (multiplayer for free), a cinema seat-booking app, and a streaming progress bar with an activity feed. Sourced: a web-agnostic event-sourcing library with commands (intent), events (past facts), a Decider class (state + evolve + command blocks), reactions (event → new command) — e.g. PaymentStarted → Stripe call → ConfirmPayment, a Projector superclass writing read-models to any store, and a test harness using given/when/then reactor specs. Sourced includes a runtime that correlates commands and events (enabling request-ID-rooted workflow tracing and a time-travel debugging UI), a web dashboard to stop/restart/replay reactors (rebuilding a projection by resetting offsets), parallel replay with per-stream ordering, Prism-based static analysis producing workflow diagrams, autonomous-services execution where each decider/projector runs at its own pace, durable execution by construction (each event snapshots the last successful step), and Dynamic Consistency Boundaries — events are not tied to a single stream but queried by attribute to build virtual streams per decision. Companion 'Event Lane App' toy generates the diagrams shown. Cidurial and Sourced integrate by swapping Cidurial's built-in store/dispatcher for Sourced's, so web commands flow through the event-sourced runtime. Q&A covers deciders as state machines over many inputs (answered via DCB), event storage (he's used Postgres then switched to SQLite; an audience member confirms Postgres works well in production), race conditions and locking (claim mechanism similar to Solid Queue), and error handling (reframe domain errors as events; reserve true exceptions for technical failures, with exponential backoff and eventual reactor de-registration).

date
2026-04-17
type
talk
renamed_title
Building Reactive Systems with Ruby and Event Sourcing
original_title
Event Sourcing and the Actor Model in Ruby
talk Event Sourcing and Actor model in Ruby
about
Event Sourcing concept
Core subject of the talk — framing state as derived from events.
talk Event Sourcing and Actor model in Ruby
about
Actor Model concept
Originally about the actor model; retitled but still briefly discussed, with a pointer to Ismael's other talks.
talk Event Sourcing and Actor model in Ruby
about
CQRS concept
Cidurial is explicitly described as a version of CQRS — separate write (commands) and read (SSE) channels.
talk Event Sourcing and Actor model in Ruby
about
Talk argues event sourcing provides durable execution for free.
talk Event Sourcing and Actor model in Ruby
about
Introduced in the Q&A to explain how decisions span multiple aggregates.
talk Event Sourcing and Actor model in Ruby
about
One of the two conceptual issues the talk opens with.
talk Event Sourcing and Actor model in Ruby
about
The other conceptual issue the talk opens with.
talk Event Sourcing and Actor model in Ruby
about
Sourced correlates commands and events to enable workflow tracing and time travel.
talk Event Sourcing and Actor model in Ruby
about
Cidurial project
Live-coded/demoed throughout the talk.
talk Event Sourcing and Actor model in Ruby
about
Sourced project
Second half of the talk walks through Sourced's primitives and runtime.
talk Event Sourcing and Actor model in Ruby
about
Decider Pattern concept
Sourced's Decider class implements decide/evolve over state and events.
talk Event Sourcing and Actor model in Ruby
about
Projector concept
Sourced ships a Projector superclass for materialising read models.
talk Event Sourcing and Actor model in Ruby
about
Reactor concept
Reactions in Sourced observe events and dispatch next commands (e.g. PaymentStarted → Stripe → ConfirmPayment).
talk Event Sourcing and Actor model in Ruby
about
Closes with the observation that each decider/projector runs at its own pace — true autonomous services communicating via event/command schemas.
talk Event Sourcing and Actor model in Ruby
about
Event Lane App project
Used to generate the workflow diagrams shown in the slides.
asked_at
Event Sourcing and Actor model in Ruby talk
First Q&A question.
asked_at
Event Sourcing and Actor model in Ruby talk
Second Q&A question.
asked_at
Event Sourcing and Actor model in Ruby talk
Q&A about concurrency.
asked_at
Event Sourcing and Actor model in Ruby talk
Final Q&A question.
person Ismael Celis
authored
Event Sourcing and Actor model in Ruby talk
Sole speaker of the wroclove.rb 2026 talk (renamed 'Building Reactive Systems with Ruby and Event Sourcing').
from_talk
Event Sourcing and Actor model in Ruby talk
Ismael's durable-execution argument in the talk.
from_talk
Event Sourcing and Actor model in Ruby talk
Ismael's answer to the error-handling Q&A.
from_talk
Event Sourcing and Actor model in Ruby talk
Core architectural message of the talk.
from_talk
Event Sourcing and Actor model in Ruby talk
Demonstrated via chat, seat-booking and streaming demos.
talk Event Sourcing and Actor model in Ruby
presented_at
Delivered on day 1 of the 2026 edition.

Provenance

Created
2026-04-17 16:18 seed
Read by
35 extractions