Search code examples
azure-service-fabric

Why do we need Reliable Actors reentrancy?


I can't figure out why do we need reentrancy. As I understood, calls from actor to actor isn't a good practice. And in example in this article we even have three actors calling each other.

  • Is there any real example to show advantages of reentrancy and how and for what purposes it have to be used?

Solution

  • It allows an actor to process more than one request at a time when the requests are part of the same chain of actor calls. Actors are single-threaded meaning an actor can only process one request at a time. Without reentrancy, A -> B -> C -> A would deadlock. Actor to actor calls are perfectly fine as long as you play by the single-threaded rules.