Chapter 4: Introducing State Management
State management for services and actors is a centerpiece of Dapr. This chapter will illustrate how a Dapr solution can manage services' states with different store types.
These are the main topics that we will explore:
- Managing state in Dapr
- Stateful services in an e-commerce ordering system
- Azure Cosmos DB as a state store
Most, if not all, of our services and actors in the Dapr applications we are building have data persisted as a state.
The state could be the status of a request, kept aside to be able to return additional information of a complex interaction at a later stage, or it could be the central information managed by the service, such as the quantity of the available product.
State management is equally important for a new, cloud-native solution built with Dapr and for an existing solution to which we are adding Dapr services.
An overview of state management concepts is our starting point...