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

Controller/Deduplicate user supervision #172

Closed
wants to merge 1 commit into from

Conversation

NelsonVides
Copy link
Collaborator

In the original implementation, the process is monitored by two supervisors, the original amoc_users_sup, and the amoc_controller one. But this means that bursts of ups and downs overflow the mailbox of two processes, one of them being actually the very critical controller.

With this reimplementation, only the amoc_users_sup tracks the processes, and all requests from the controller are asynchronous. This ensures the controller does not get blocked and can remain responsive to control requests.

@NelsonVides NelsonVides changed the title Optimise user supervision Controller/Deduplicate user supervision Dec 16, 2023
@NelsonVides NelsonVides changed the base branch from controller/return_more_explicit_status to controller/tests December 16, 2023 11:28
@NelsonVides NelsonVides changed the base branch from controller/tests to controller/return_more_explicit_status December 16, 2023 11:29
@NelsonVides NelsonVides force-pushed the controller/return_more_explicit_status branch from 7f1b6b9 to 8590a36 Compare December 19, 2023 09:26
Base automatically changed from controller/return_more_explicit_status to master January 3, 2024 13:40
@NelsonVides NelsonVides marked this pull request as ready for review January 3, 2024 17:12
@NelsonVides NelsonVides closed this Jan 3, 2024
@NelsonVides NelsonVides reopened this Jan 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2024

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (33cce56) 47.64% compared to head (126ffb6) 73.62%.
Report is 24 commits behind head on master.

Files Patch % Lines
src/users/amoc_users_sup.erl 82.45% 10 Missing ⚠️
src/throttle/amoc_throttle_controller.erl 87.50% 5 Missing ⚠️
src/coordinator/amoc_coordinator_sup.erl 88.46% 3 Missing ⚠️
src/coordinator/amoc_coordinator.erl 95.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #172       +/-   ##
===========================================
+ Coverage   47.64%   73.62%   +25.97%     
===========================================
  Files          23       29        +6     
  Lines         976     1069       +93     
===========================================
+ Hits          465      787      +322     
+ Misses        511      282      -229     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

In the original implementation, the process is monitored by two supervisors, the
original amoc_users_sup, and the amoc_controller one. But this means that bursts
of ups and downs overflow the mailbox of _two_ processes, one of them being
actually the very critical controller.

With this reimplementation, only the amoc_users_sup tracks the processes, and
all requests from the controller are asynchronous. This ensures the controller
does not get blocked and can remain responsive to control requests.
@NelsonVides
Copy link
Collaborator Author

Done in #175

@NelsonVides NelsonVides deleted the controller/dedup_supervision branch February 21, 2024 22:15
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.

2 participants