3 ms·
Do you mean inter-system? Intra-system would mean on the same db, so a simple transaction would do. For inter-system consistency, you’d probably need a reconci
by herval 1y ago
Do you mean inter-system? Intra-system would mean on the same db, so a simple transaction would do.
For inter-system consistency, you’d probably need a reconciliation mechanism or some kind of 2 phase commit
- saxenaabhi 1y agoI mean a bank account sending money to another bank account. That would be 2 events(one withdraw and one deposit)? But if I'm downstream consumer consuming the event log and computing the state from that, if for some reasons I receives only first event the state computed would be invalid and not represent the real state of accounts?
- manoDev 1y agoNobody relies on atomic transactions to model money transfers in the real world. You can read up on "clearing" and "settlement" processes to get an idea.
- herval 1y agoIt could be one event with two database rows inserted, CQRS doesn’t have to map 1:1 to db entries. But in general, these kinds of systems are more complex than 1 or 2 writes, so relying purely on transactions isn’t very common