Right now the Actor framework is method oriented, the ActorRef is generalizing over the ActorImpl ActorRef<ActorImpl>, this is causing design-problems if one wants to store different ActorRefs over different ActorImpls in a single container. The intention of the container is to sent the same message to each one.
Instead of ActorRef<ActorImpl> the framework should use references being message oriented, such as Slot<MessageType>
Lets call this proxy (channel::tx) Slot for now.
The function create_actor() might return a single slot or multiple slots, for example
let (slot_msg_type1, slot_msg_type2) : (Slot<MsgType1>, Slot<MsgType2>) = create_actor(MyActorImpl::new(x,y,z))?;
Thanks for this issue @frehberg! Its a problem that has vexed me for some time. I was thinking perhaps this could be solved though enums generated by a macro, similar to inventory but I havent had the chance to look into this in more detail...
Right now the Actor framework is method oriented, the ActorRef is generalizing over the ActorImpl
ActorRef<ActorImpl>
, this is causing design-problems if one wants to store different ActorRefs over different ActorImpls in a single container. The intention of the container is to sent the same message to each one.Instead of
ActorRef<ActorImpl>
the framework should use references being message oriented, such asSlot<MessageType>
Lets call this proxy (channel::tx)
Slot
for now.The function create_actor() might return a single slot or multiple slots, for example