When people learn about database transactions, they often learn that transactions are useful when you want to modify multiple values together and want all of the ACID guarantees.
Let’s move from academic to practical and think about what happens when you process an event in a production app. The most common patten we see:
- Collect context about the event and needed information to drive an action.
- Make a decision.
- Record that decision in state,
- Respond to caller and simultaneously export to a “big data” system for analysis.