3 ms·
I mean, it's possible to build something like that but why would you ever want to do that? It's so much simpler to just use a transaction per request and let th
by rockostrich 3y ago
I mean, it's possible to build something like that but why would you ever want to do that? It's so much simpler to just use a transaction per request and let the database's transaction logic handle which requests succeed and which ones fail. Clients should have retry logic to handle the failure scenarios. It's a lot simpler to reason about than trying to turn a distributed system into a single threaded one.
- josephg 3y agoI presume the idea is to make microservices able to work with database transactions. Microservices: Proof that not all ideas can be winners.
- rockostrich 3y agoNot really sure what the point is here. Microservices work great with database transactions.
- dontlaugh 3y agoNo, they don’t. You can have a function in a library, to which you pass a transaction. You can’t pass an open transaction to another service, in the general case. The service boundary forces multiple separate transactions.