3 ms·
Curious - how do you end up handling transactions that span services? I'm getting into go, but there doesn't seem to be a great pattern for this. Used to @Tran
by ashtar 5y ago
Curious - how do you end up handling transactions that span services?
I'm getting into go, but there doesn't seem to be a great pattern for this. Used to @Transactional on the service, so feels annoying in having to build that.
- asimpletune 5y agoI think the answers requires more context, but for example one well known pattern is called “sagas” for implementing long lived distributed transactions. The gist is you timeout but provide a way for transactions to resume. Also obviously there’s 2PC but again it depends on what unite trying to solve.
- mrath 5y agoHow does @Transactional span services? With a JtaTransaction manager? If you are saying about micro services here which talk grpc/http then @Transactional does not help. If you are talking about inside one service then you have write all that boilerplates, and it will not look as simple as Java