Transactions in microservices

后端 未结 6 1421
孤街浪徒
孤街浪徒 2021-02-07 00:52

I have read some articles about microservices architecture, but no one takes the topic of transaction. All that they says that this is hard to do it. Maybe someone can describe

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 01:44

    I may not be the ultimate expert in this, but I'm sure you're heading towards the Distributed Transactions. In order to have them running, all the application service components need a common shared transaction id, and you have to make sure that every component is informed about the state of the transaction. It is asynchronous, so you'll require substantial prog skills.

    Here are distributed transactions mentioned or discussed:

    https://en.wikipedia.org/wiki/Distributed_transaction

    http://contino.co.uk/microservices-not-a-free-lunch/

    http://martinfowler.com/articles/microservices.html

    It would seem people try to avoid it as it is difficult. Maybe that's why you don't find much about.

    Hope this helps a step forward :-)

提交回复
热议问题