Modeling a Process
A recurring theme throughout this book is that the model and design of an event-sourced system are often more important than the code itself. Modeling process managers may be the best example of this theme.
Writing a function that takes an event and returns a command is relatively easy, but figuring out when you should and should not be using a process manager often proves far more difficult.
The simplest possible process has a discrete beginning, middle, and end. In technical terms, that means an event must start the process, one or more events may advance the process, and one or more events must stop the process.
Required and Optional Events | |
|---|---|
|
Pay special attention to the use of may and must here. A process always requires ... | |
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