-
Notifications
You must be signed in to change notification settings - Fork 129
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
Persistent workers for the *apply backends #289
Comments
Best part: we could totally get rid of staged parallelism this way and be left with a minimal-overhead solution. |
I thought a bit about message passing. We don't need very elaborate functionality, just post, receive, and wait for R objects. On the other hand, a storr namespace will require file system access for all workers. I wonder if we could use an established library like MPI for sending commands to workers and receiving results. |
Message passing is certainly the appropriate paradigm here. Would posting allow us to send entire targets to master? Otherwise, I think the workers need cache access anyway. |
All the |
Even if the worker reads a file created by the master or by some other worker, it can be viewed as a form of "posting" a message. A message can be a blob of arbitrary size. We just don't want to block the master until a worker has read the data, which is why I used this term.
MPI should be able to handle this, I wonder if that's the best solution though. |
Is the master receiving the value of the target itself?
Yeah, it seems like |
Another thing: before each target is built, the environment should be pruned in order to make sure dependencies are loaded and targets we don't need anymore are unloaded. In order to know what we can safely unload, each worker needs to know which targets the other workers are building. This information is easy to communicate using the file system, and it should also be possible with message passing. |
Closing because I think we should move this thread to #285. Persistence is a whole new scheduling paradigm for |
I tried this once before and failed, but from what I learned from #227, I think it is possible after all. The master process can communicate with workers with a special
workers
namespace in the cache. If we succeed, we may not need acallr
backend (#278), though we should keep the existing schedule for thefuture
backend for cases where workers do not have cache access.The text was updated successfully, but these errors were encountered: