Chapter 7: Using Actors
In this chapter, you will learn about the powerful virtual actor model, as implemented in Dapr, and how to leverage it in a microservices-styled architecture, along with the pros and cons of different approaches. The actor model enables your Dapr application to efficiently respond to scenarios of high resource contention by streamlining state management.
We will cover the following main topics in this chapter:
- Using actors in Dapr
- Actor lifetime, concurrency, and consistency
- Implementing actors in an e-commerce reservation system
The entry barrier for adopting Actors in Dapr is lower than the complexity behind the core concept of the actor pattern theory. Nonetheless, a solid understanding of the scenarios for Actors – including the ability to recognize bad practices and to avoid any pitfalls – is a prerequisite for their adoption. Therefore, we will start by providing an overview of the actor model before moving on...