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

Remote Workers and Worker-Supervisor #140

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

matyasmarkovics
Copy link

Remote Workers

I needed to create a pool of processes similar to the rpc module implementation in Erlang/OTP. - rpc (or rex) is a single process, I needed a pool of them. - This led me to extend poolboy, so that (local) workers could be started by a supervisor on a remote node.

For this to work these are the necessary steps:

  1. Find the Pid of the Worker-Supervisor, even if remote, see find_pid/1
  2. Start the workers via their Supervisor, even if Supervisor is remote, see new_worker/2
  3. Monitor Worker-Supervisors, that were passed in and stop if they go DOWN
  4. Monitor Remote node if Worker-Supervisor is remote and stop on nodedown
  5. Stop Worker-Supervisor using gen_server:stop/1, so that it works remotely too. See: stop_supervisor/2

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

Successfully merging this pull request may close these issues.

None yet

1 participant