3 ms·
> You could have a service bus, where you publish a "PersonDeleted" message that the other services would subscribe to. It decouples the Person service from all
by mercurial 12y ago
> You could have a service bus, where you publish a "PersonDeleted" message that the other services would subscribe to. It decouples the Person service from all the other related entity services.
You're still screwed if you complete a transaction on the deleted person's still-existing account, now that your system is no longer transactional...
- newobj 12y agoYour objection is hypothetical/abstract and when you ground it in specific use cases there are plenty of patterns that emerge addressing how to deal with the inconsistent state. For example, just-in-time/read reconciliation, batch remediation, actually making some subset of actions transactional/consistent and suffering lower availability there, and so on and so forth.
- mercurial 12y agoI'm not saying there are no solutions, but saying "just add an event bus" is unlikely to be sufficient. Whatever you do, you're going to pay additional costs in terms of complexity.
- threeseed 12y agoYou can setup distributed transactions e.g. using Zookeeper, Consul, Redis etc. It adds complexity of course but that is the give/take when you use microservices.
- chiph 12y agoYeah, if you're an ACID person, this approach is going to present conceptual challenges. The propagation delay is a mostly-solved problem, which I know because lots of high-scale sites work. Getting a summary of their design decisions around this would be a huge time-saver, but I don't know of one.