Object-oriented event sourcing

Object-oriented event sourcing

This time, we’re going to refactor our solution towards an object-oriented (OOP) style. The finite state machine we implemented previously enables us to take advantage of polymorphic behaviour while sticking to immutability.

November 16, 2023 · 8 min · 1702 words · Jakub Zalas
Deriving state from events

Deriving state from events

In event sourcing, the state is derived from events that have happened in the past. In a classic approach, state is persisted while events are lost. In an event-sourced system, it’s the events that are persisted while state is derived.

November 10, 2023 · 11 min · 2176 words · Jakub Zalas
Mastermind game implemented with event sourcing

Functional event sourcing example in Kotlin

Let’s implement the Mastermind game with event sourcing. For now, we’re only focusing on the domain model.

November 3, 2023 · 18 min · 3734 words · Jakub Zalas
Functional event sourcing

Functional event sourcing

Let’s consider how functional domain model might work in practice by applying the event sourcing pattern.

October 19, 2023 · 9 min · 1817 words · Jakub Zalas