I'm a big fan of the actor model (in particular, the actix
crate) and was thinking of using it as the basis for a motion controller.
For my use case, almost everything can be modeled as "poll me every X µs" or "wake me up again when Y happens" which fits in really well with the futures model. I've also seen the source code for several motion controller projects in the past, and needing to deal with asynchronicity (e.g. pause execution of the current task until a condition is satisfied some time in the future) and concurrency (make progress on several tasks at a time) lead to a lot of spaghetti code and complex state machines which use global variables to communicate between tasks. I was hoping async-await would be able to simplify the spaghetti and actors could help with the communication and decoupling.
While I can dive into the source code for actix
, it's quite a large system and what I'm really looking for is the high level understanding and architecture.
Can anyone point me towards articles about implementing actor systems (either in Rust or other languages) or async primitives (e.g. a runtime and executor)?