Summary
In this chapter, we have learned about grain state and different providers to persist grain state. We used the Cosmos DB provider from the OrleansContrib community to persist our HotelGrain
state. We implemented a custom storage provider for Azure file storage. We also learned how to use more than one provider in the same grain. Now you have the skills required to manage the state of distributed applications built with Microsoft Orleans. You also know how to create a custom state provider if there is a need.
Till now, all the interactions that we have built have been client-driven, which means we do the operation when a message is received from the client. There are situations where we need an operation to execute at regular intervals. In the next chapter, we will learn about reminders and timers in Orleans.