Evolving Lunar Frontiers
To experience the evolution of an event-sourced system first hand, you’ll be evolving the Lunar Frontiers game. It would be overwhelming and difficult to follow if you evolved aggregates, projections, and process managers all at the same time, so this section will focus only on the evolution of aggregates.
In the case of Lunar Frontiers, there’s no need to have both a site and a building aggregate when we can just put a construction progress field on the building.
The current construction process starts with SiteSpawned, progresses via ConstructionProgressed, and then when it finishes with ConstructionCompleted, it issues a command to spawn a building, ultimately resulting in BuildingSpawned:
SiteSpawned -> ConstructionAdvanced ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access