4 ms·
Curious about the minimize state in-flight. If the producer has state on-hand, why not include it and just have a policy around when you trust it. If it’s eq
by jcims 8y ago
Curious about the minimize state in-flight. If the producer has state on-hand, why not include it and just have a policy around when you trust it. If it’s equal cost for producer or consumer to collect state then maybe, but how often is that the case?
- rswail 8y agoThe event is independent, it is based on the state of the aggregate at the time the event occurred. It's better to have a vector clock for the aggregate as part of the event to determine what was the state when the event occurred. Even if you "have a policy" people will ignore it. Better to make it explicit.
- pyrale 8y agoConsider replacing "event" by "observation". What you really have is a set of observations, and a state that you infer from it. Observations you make may be reliable, but you have no guarantee that you can observe every fact in the problem. For instance, if you're a payment processor in the EU, and a withdrawal was done in the US, you may not have received it yet, so you have an incorrect balance. If a withdrawal is made in the EU, and you add the balance in the event, you will have mixed a perfectly legit observation with something, which is not an observation but an inference, an artifact processed from your incomplete set of observations. Trust is something that changes over time. When your EU platform was implemented, maybe your US platform didn't exist. But the difference between observations and inference will remain true.