A crate that is providing an Actor model to develop toy distributed systems using Maelstrom.
Maelstrom is a workbench for learning distributed systems by writing your own. It uses the Jepsen testing library to test toy implementations of distributed systems.
Examples following the official documentations can be found in the examples folder.
The crate exposes:
```rust use maelstromrs::actor::Actor; use maelstromrs::message::{Request, Response}; use maelstromrs::error::Error; use maelstromrs::runtime::Runtime;
fn main() { let node = EchoActor { node_id: None }; let mut runtime = Runtime::new(Box::new(node)); // runtime.start(); }
struct EchoActor {
node_id: Option
impl Actor for EchoActor {
fn init(&mut self, nodeid: &str, _nodeids: Vec
fn receive(&mut self, message: &Request) -> Result<Vec<Response>, Error> {
match message.message_type.as_str() {
"echo" => unimplemented!(),
_ => unimplemented!(),
}
}
} ```