© 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_12

12. Event Sourced Grains

Richard Astbury1  
(1)
Woodbridge, UK
 

Overview

The state of a grains is typically a single data structure. The grains will mutate the fields over time and persist when appropriate. Orleans provides an alternative way of managing state. Instead of a single data structure, we can consider state as the accumulation of a number of events which, applied in sequence, generates the state object. We call this event sourcing.

In this chapter, we will see how Orleans natively supports event sourcing, by creating a journaled grains which has a state log rather ...

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.