Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessDispatcher not working #25

Open
lucasvfventura opened this issue Mar 6, 2017 · 4 comments
Open

ProcessDispatcher not working #25

lucasvfventura opened this issue Mar 6, 2017 · 4 comments

Comments

@lucasvfventura
Copy link
Contributor

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

@alexpantyukhin
Copy link
Contributor

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?

@rogeralsing
Copy link
Contributor

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.

@ipinak
Copy link
Contributor

ipinak commented Mar 12, 2017

I don't see where pickle is involved either. Maybe @lucasvfventura has a lead on something?

@lucasvfventura
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants