-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make ered an application with its own supervision tree #41
Open
zuiderkwast
wants to merge
6
commits into
Ericsson:main
Choose a base branch
from
zuiderkwast:application
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zuiderkwast
force-pushed
the
application
branch
from
March 20, 2024 09:32
a689874
to
f84f0e9
Compare
The command handling code is moved from ered to ered_cluster. The ered module becomes just an API module without a process of its own. This eliminates some duplicated structures and copying between processes. Change ered_client_sup into to simple_one_for_one supervisor. No API changes.
Ered becomes an application with its own supervision tree. In the API, connect_cluster/2 replaces start_link/2 and close/1 replaces stop/1. The processes are added to ered's own supervision tree. An ered instance monitors the caller and closes down if the owner dies, much like the controlling process concept in gen_tcp and ssl.
The process traps exits so terminate/1 will run even if the process crashes.
Make the messages sent by a standalone ered_client match those sent by a cluster client for each client, i.e. a map with the keys msg_type, reason, client_id, addr and the optional fields cluster_id and master.
bjosv
reviewed
May 28, 2024
bjosv
reviewed
May 28, 2024
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
bjosv
reviewed
May 28, 2024
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Björn Svensson <bjorn.a.svensson@est.tech>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains some separate commits. It might be better to review them one by one.
Merge ered and ered_cluster processes
The command handling code is moved from ered to ered_cluster. The ered
module becomes just an API module without a process of its own. This
eliminates some duplicated structures and copying between processes.
Change ered_client_sup into to simple_one_for_one supervisor.
App and supervision tree
Ered becomes an application with its own supervision tree.
In the API, connect_cluster/2 replaces start_link/2 and close/1 replaces
stop/1. The processes are added to ered's own supervision tree. An ered
instance monitors the caller and closes down if the owner dies, much like
the controlling process concept in gen_tcp and ssl.
Add info message 'cluster_stopped' sent in ered_cluster:terminate/1
The process traps exits so terminate/1 will run even if the process
crashes.
Unify info messages from ered_client and ered_cluster
Make the messages sent by a standalone ered_client match those sent
by a cluster client for each client, i.e. a map with the keys
msg_type, reason, client_id, addr and the optional fields
cluster_id and master.