© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
R. AstburyMicrosoft Orleans for Developershttps://doi.org/10.1007/978-1-4842-8167-3_11

11. Transactions

Richard Astbury1  
(1)
Woodbridge, UK
 

In this chapter, we will learn how Orleans supports transactions across grains. This allows us to update the state of multiple grains in one atomic operation to avoid scenarios where failure can lead to inconsistent state across grains.

Motivation for Transactions

Transactions are useful when a system has distributed state that is co-dependent. Using payments as an example, if the amount was deducted from one account but not credited to the second, perhaps due to a transient fault, we would see an inconsistent state and ...

Get Microsoft Orleans for Developers: Build Cloud-Native, High-Scale, Distributed Systems in .NET Using Orleans now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.