4 ms·
ES has the potential but is too immature of a pattern to be simple. It’s a shame, but let’s not pretend. For instance, an immutable event log is illegal in man
by klabb3 3y ago
ES has the potential but is too immature of a pattern to be simple. It’s a shame, but let’s not pretend.
For instance, an immutable event log is illegal in many cases (PII). So you have to either do compaction on the log or use an outside mutable store.
Another issue is code evolution: if you change your event processing logic at runtime, you get a different state if you replay it. Maybe some users or orders will not be created at all. How you deal with that? Prevent it with tooling/testing or generate new events for internal actions?
Also, all the derived state is eventually consistent (so far so good) but for non-toy apps you absolutely need to use derived state to process events, which naively breaks determinism (now your event processing depends on the cursor of the derived state).
Check out Rama[1]. They’re solving this problem, and it’s super interesting but again let’s not fool ourselves – we’re far from mature and boring now.
Something like it could hopefully become boring in the future. Many of these features could probably be simplified or skipped entirely in later iterations of these patterns.
[1]: https://redplanetlabs.com/learn-rama https://redplanetlabs.com/learn-rama