Event handlers are pure and transparent functions that apply events to create application state.

Pure and transparent functions

Pure and transparent means that there are no side-effects and it is deterministic with the same input. Something functional programming languages like Elixir excel at!

They should not be confused with command handlers

Command handlers create events out of commands and validate commands.

Reference

Hoffman, Kevin. Real-World Event Sourcing: Distribute, Evolve, and Scale Your Elixir Applications. The Pragmatic Bookshelf, 2025. The Pragmatic Programmers.

Highlights or timestamps

Real-World Event Sourcing

Transclude of 1756163751-real-world-event-sourcing#^