6 ms·
can you share a more helpful real world example? as someone who hasn't implemented transactions in microservices before, I have only seen the bank transfer exa
by marktani 3y ago
can you share a more helpful real world example?
as someone who hasn't implemented transactions in microservices before, I have only seen the bank transfer example and it seems adequate and easy to understand - I wouldn't know what limitations it has
- numbsafari 3y agoIt doesn’t exist. This isn’t how banks transfer funds between accounts. It’s fake. As a result, you can’t actually evaluate the engineering trade offs of the proposed solution. Here’s the thing: do you even need transactions (in the sense of ACID transactions that are resolved heuristically, as described in this article) between your microservices? Likely not. And what are the implications of having to wait around for PGSQL and Mongo negotiate a transaction between a third data store? Probably blocking and latency and all the associated problems which will lead to … not use transaction across service boundaries.
- jen20 3y agoThe trick is to work out what you would do if you had to implement the entire system on paper in a 50s style office with triplicate carbon paper. Then do that, but with computers.
- yathaid 3y agoThat is not a trick, it is a false analogy. Two humans in eyesight line can be assured that they have exchanged messages successfully. Two computers cannot due to recursing acknowledgements (byzantine generals).
- defrost 3y agoMore realistically; Two humans in eyesight line can believe that they have exchanged messages successfully. Both parties misunderstanding the other is a common trope in movies and novels for a reason.
- jen20 3y agoNo, it’s not a false analogy. Go look at an old office building and consider whether people really are “in eyesight line” - assuredly they are not. The unreliable messaging links (internal mail) mean that resilience against missed messages and guards against not making progress must be built into the business process instead of an infrastructure layer.