Quix
Distribution layer for Actix. Aims to follow conventions set up by actix, and implement distribution capabilties, similar to erlangs dist.
Messages
Both internal and user messages use Protobuf format for serialization
Processes
In order to better handle distribution, we will introduce a concept of a process, which is just an identified actor.
This actor is not referneced through the Addr<A>
struct, but rather through Pid<A>
, which internally:
- Wraps
Addr<A>
and transparently passes messages to this addr - Wraps
Remote<A>
and passes message to actor on remote node.
The Pid<A>
can be obtained in 2 ways:
- Using
Process<A>
instead ofContext<A>
- New context type for actors, which have stable identity. - Receiving a message containing a
Pid<A>
- Pids are transparent, and can be sent between nodes. The distribution subsystem should handle node lookup internally, thorugh the node-local registry.
ProcessRegistry
Is a node-local singleton, which contains a map of actors
Message dispatching
Each message which is passable accross network boundaries must be serializable using protobuf.
The ProcessDispatch
trait is responsible for creating a Dispatcher
which performs message serialization and
dispatching. It can be implemented by a proc macro: