ProcessDispatcher not working
While running a different process the function passed to the child process and all the objects it needs to execute must be pickle. Because of this the current implementation doesn't work with the ProcessDispatcher
Not sure that pickle can serialize that. There is a list of what can be serialized: https://docs.python.org/3.5/library/pickle.html#pickle-picklable and methods of class is not there. And here we actually pass class method (https://github.com/AsynkronIT/protoactor-python/blob/22e63e9104b763464d39e7dd362fc2c4ff008804/protoactor/mailbox/mailbox.py#L58) . Do we really need ProcessDispatcher?
Having gone through all the magic hokus pokus solutions in Akka.NET, I'd throw my vote at letting the proto.remote layer handle all of this instead.
the infrastructure in proto actor is deliberately designed to avoid "magic", being explicit and building on standards for everything. all serialization is protobuf, all networking is gRPC etc. This reduce alot of pain and future maintenance issues.
It's far too easy to end up with "we use this semi hack to solve this problem, then we need this other hack to solve the first hack and a nother hack to solve the second hack"
Maybe this is way less magic in Python, but as this is a framework for distributed programming, it seems odd to solve the same problem again internally.
my 2 cents.
I don't see where pickle is involved either. Maybe @lucasvfventura has a lead on something?
Pickle is involved when we launch a new process, (when we dispatch the actor to process the mailbox)... AS said by @rogeralsing I think we should simply it. remove the process dispatcher and work only with the thread dispatcher but in a cleaver way with asyncio.
The idea of running multiple process in a single machine should be implement in the Remote module for isolation and simplification purposes, less magic.
This wil also simply the queue usage... The queue from the queue module is thread safe