June
June is a library that enables remote actors designed for use in distributed systems.
It is designed to be as non-obstructive as possible, and its developer experience is extremely similar to using raw actix (since it uses actix for the heavy-lifting).
There are just a few things one needs to know to start using remote actors.
// everything in this specific part is what you would normally do
// while working with actix. In case of any doubt in this part, you should
// look at the docs from actix.
// we'll first define a normal actix actor
// declare the actor and its context
// Declare `Increase` message.
// Messages need to implement Serialize and Deserialize
// to be able to be sent and received in remote actors.
;
/// Handler for `Increase` message
// Declare `Reduce` message
;
/// Handler for `Reduce` message
After declaring the actor and its messages, we can use it remotely via june.
// start by declaring a remote, which is a wrapper that encapsulates all messages
// that can be sent remotely.
remote!
// now we can expose an actor
async
// and we can now dial the actor we exposed
async
June also offers a maquio-routing feature that enables traits for working with maquio routers more ergonomically.