Abstract
Does "Arc Mutex T" make you feel uncomfortable too?
In an async world, we can happily use Tokio to write applications which communicate. Apart from the basics, and unbeknownst to many, Tokio gives us all the primitives we need to structure our apps in a maintainable, testable, and reusable way: the actor model.
But there are many ways to implement actors, and some lack good testability, require magic, or constrain the user needlessly. Additionally, actors are only one side of the story! The others are channels and future combinators.
Starting from Alice Ryhl's original post about the matter, I have refined my approach to actors for years. I have arrived at a style which structures applications in a composable fashion, facilitates brilliantly easy testing/mocking, and informs architecture, all while staying open to performance improvements.
Apart from these advantages, I want to highlight the strong positive influence on architecture of this approach, as well as it's shortcomings, challenges, and limits.