Re:Show HN: Kameo – a Rust library for building fault-tolera...
by throwawaymaths on Wednesday October 02, 2024 @03:03PM
(#41723970)
Is this actually distributed? I see no evidence that this can be used in conjunction with even ipc with builtin features.
[ Parent
| on HN ]
Re:Show HN: Kameo – a Rust library for building fault-tolera...
by hansonkd on Wednesday October 02, 2024 @03:30PM
(#41724224)
Check the examples folder.
Re:Show HN: Kameo – a Rust library for building fault-tolera...
by qwertox on Wednesday October 02, 2024 @03:35PM
(#41724281)
https://github.com/tqwewe/kameo/blob/main/examples/remote.rs
// Bootstrap the actor swarm
if is_host {
ActorSwarm::bootstrap()?
.listen_on("/ip4/0.0.0.0/udp/8020/quic-v1".parse()?)
.await?;
} else {
ActorSwarm::bootstrap()?.dial(
DialOpts::unknown_peer_id()
.address("/ip4/0.0.0.0/udp/8020/quic-v1".parse()?)
.build(),
);
}
let remote_actor_ref = RemoteActorRef::<MyActor>::lookup("my_actor").await?;
match remote_actor_ref {
Some(remote_actor_ref) => {
let count = remote_actor_ref.ask(&Inc { amount: 10 }).send().await?;
println!("Incremented! Count is {count}");
}
...
Re:Show HN: Kameo – a Rust library for building fault-tolera...
by throwawaymaths on Wednesday October 02, 2024 @05:30PM
(#41725140)
Thanks! It's not in the front page material.