by toolslive · 6y ago · 0 comments
For systems, this is going to be painful: you want to be able to do things like "compare-and-swap" which are already an action and a query bundled in one. You need this for 2 reasons:
- consistency: you want the query and the update to be done in one go. atomically
- performance: doing it like this is faster as
you're combining 2 things in one call, iso 2.In theory, it is possible to do "synchronous CQRS", where the update to your write-side is done in a single transaction with the update to the read-side, but that's not how I've ever done it in my (Scala/Postgres based) CQRS app experience.