Transactions in NoSQL?

前端 未结 11 1011
长情又很酷
长情又很酷 2020-12-22 18:39

I\'m looking into NoSQL for scaling alternatives to a database. What do I do if I want transaction-based things that are sensitive to these kind of things?

11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 19:34

    You can implement optimistic transactions on top of NoSQL solution if it supports compare-and-set. I wrote an example and some explanation on a GitHub page how to do it in MongoDB, but you can repeat it in any suitable NoSQL solution.

提交回复
热议问题