For testing purposes, I have been trying to figure out a way to control the run-time message passing within an actor system with some sort of external (separate from the acor system) controller. In other words, given an actor system: how do I set up a sort of controller that controls the message passing within it?
For instance, with two actors, A and B: I would want to a controller to do something like:
- Actor A received message “Start” from the outside and sends “Message” to Actor B
- Perform some blocking logic on the controller, i.e the actor system will idly wait for this logic to be performed.
- Now that the logic has been executed, the controller sends a green light for the actor system to resume the message passing.
- Actor B receives “Message” and does some work.
- Controller checks whether the actor system is terminated, which it is, and performs some additional logic.
In short, I want the external controller to be able to control the message passing within the actor system at run-time.
Is this doable?