Functional Event Sourcing
summary
Live-coded example builds a light-bulb aggregate in F# using a strict decide/evolve pair (pure functions) and BDD-style tests that never expose internal state. Persistence starts as a simple file-backed event store, then moves to an append-only stream (EventStore), adds optimistic concurrency with an expected-version check, retry-on-conflict and snapshotting. Entire demo fits under ~300 lines of code, runs locally and remotely, and proves the pattern works end-to-end without exotic infrastructure.
AI-written summary · about
