4 ms·
Again with the straw man example of a bank transfer. Another article you didn’t need to read because it talks about a problem you likely don’t have because the
by numbsafari 3y ago
Again with the straw man example of a bank transfer.
Another article you didn’t need to read because it talks about a problem you likely don’t have because the author can’t be bothered to come up with actual, real world examples.
- marktani 3y agocan 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.
- koromak 3y agoFine. I've got a Document database for user data, AWS Cognito for user ID's and authentication, Stripe for payments, and Postgres for a subset of user profile data that interacts with application data. Common actions like Create, Delete, and some Updates touch all of these services. Automatic transactions between these would be fantastic. Especially on the billing side, some billing flows involve multiple trips between Stripe and our DB, batching the whole process inside a guaranteed reversable transaction would be lovely. Of course we're not going to get that with Stripe and Cognito as they expose bespoke API's, but the idea still holds.
- numbsafari 3y agoExcept it doesn’t, really. You don’t usually want your user sitting around waiting for all those services to talk to each other before they a notification that the process is complete or not. Further, those complex interactions between those various services will be much hard to debug and tweak when trying to provide support to end users. Can’t pay your bill because Cognito is down? Can’t grant access because Stripe is down? The data warehouse is doing an index build so you can’t do any transactions? Guess we should turn off the website between 2AM and 4AM ET to allow for data warehouse rebuilds. There’s a reason we don’t do things this way.
- yathaid 3y ago>> You don’t usually want your user sitting around waiting for all those services to talk to each other before they a notification that the process is complete or not. I have had this exact use case in a problem I was solving where the user was waiting at the other end. Please do not presume that only the problems you have solved are worth solving or exist in the real world.
- yathaid 3y agoAlso this: >> Can’t pay your bill because Cognito is down? I mean, if your AuthN and AuthZ is down, what else would you do ?!! >> There’s a reason we don’t do things this way. The smugness in this line is astounding. I don't think I can express how wrong you are.
- jeremyjh 3y agoPeople who have a use for this technology don't need a real world example, they already know where they would apply it. Its true that most people don't need it at all, and I cringe at the thought of a second wave of micro-service muppets stitching it all together with something like this, but there are actually real-world examples. I'm not going to offer you any though, due to your belligerence in the other comments. A bank transfer is a good example because it is easy to understand, regardless of your background.
- paulddraper 3y agoIt's used because it doesn't require a page of backstory