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

Add supervision tree #1

Closed
zuiderkwast opened this issue Jun 9, 2022 · 0 comments · Fixed by #39
Closed

Add supervision tree #1

zuiderkwast opened this issue Jun 9, 2022 · 0 comments · Fixed by #39
Labels
enhancement New feature or request

Comments

@zuiderkwast
Copy link
Collaborator

zuiderkwast commented Jun 9, 2022

In general, processes should belong to a supervision tree. At least most of them.

This is considered good OTP style. (Hypothetically, if trap exit is later added to a process started using spawn_link, the process is not killed by the link. If it's instead managed by a supervisor, it is brutally killed even if it's trapping exits. One should not re-invent supervisors.)

@zuiderkwast zuiderkwast added the enhancement New feature or request label Nov 13, 2023
zuiderkwast added a commit that referenced this issue Feb 22, 2024
This change adds a supervisor for client processes, so a client process
can crash without affecting the other client processes or the ered
instance. (An ered client may crash e.g. due to a bug in OTP's TLS
implementation.)

To keep track of missing or dead client processes, the ered process
manages monitors to all ered_client processes, so it can properly return
errors to commands handled by a crashed client process.
`ered:command/3,4` returns a value in all situations, but
`ered:command_async/4` is not guaranteed to always return a value.
Specifically, if the client process crashes at the same time as the
command is issued, the async callback function may never be called.

Fixes #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant