Ascolt
Async runtime-agnostic actor framework
Features
- Clean type-safe syntax
- Async support
- Both unbounded and bounded channels supported
- Handler errors can trigger actor stop, forced stop, or restart (behavior is customizable)
- No heavy macros
- No unsafe code
Examples
let first_actor = FirstActor ;
let = bounded_channel;
let second_actor = SecondActor ;
let = bounded_channel;
// if using tokio runtime
spawn;
spawn;
first_actor_tx.tell
.await?; // fire-and-forget
let result = second_actor_tx
.ask
.await?; // request-response
println!;
More examples located at examples directory.
What can be added
- Panic isolation
- Backpressure management
- Supervisor for controlling multiple actors
- Dependency graph (e.g., automatically shut down actors when the actors they depend on stop)
- Actor communication over the network