-
Notifications
You must be signed in to change notification settings - Fork 23
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
Throttles/rework run and sending logic #180
Merged
Merged
Commits on Jan 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9952d01 - Browse repository at this point
Copy the full SHA 9952d01View commit details -
Configuration menu - View commit details
-
Copy full SHA for b674ab0 - Browse repository at this point
Copy the full SHA b674ab0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fa979e - Browse repository at this point
Copy the full SHA 6fa979eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac8196e - Browse repository at this point
Copy the full SHA ac8196eView commit details -
Implement send_and_wait as a blocking gen_server:call/3
Notice that a normal send would spawn a local process, send a pid across distribution, have the local process receive an atom across distribution, and have the `Msg' be delivered to the requester locally. That is 1 pid and 1 atom across distribution and one local payload, plus one spawn that copies the payload. Doing a call instead will only send back and forth the payload, and already solve monitoring problems This is specially optimal when the payload is a literal, like an atom.
Configuration menu - View commit details
-
Copy full SHA for 6db5510 - Browse repository at this point
Copy the full SHA 6db5510View commit details -
Fail if async_runner died unexpectedly
Note that in this case, the desired operation will never happen, and therefore the test has been deemed invalid.
Configuration menu - View commit details
-
Copy full SHA for 7204660 - Browse repository at this point
Copy the full SHA 7204660View commit details
Commits on Jan 18, 2024
-
We here revert the changes of the previous commits and instead move the logic regarding the `async_runner` to a separate module. This way, the `amoc_throttle_process`'s only responsibility is to track runners and notify them that they can run; the `amoc_throttle_controller`'s only responsibility is to assign tasks to processes and control the rates; and `amoc_throttle_runner`'s only responsibility is to execute the actions.
Configuration menu - View commit details
-
Copy full SHA for fa4df82 - Browse repository at this point
Copy the full SHA fa4df82View commit details -
Encapsulate creating throttle runners outside of throttle process
With this, now `amoc_throttle_process` only tracks the runners and doesn't know about creating them nor about what operation is it running, and the controller now only controls the rate, and not the choosing of a worker.
Configuration menu - View commit details
-
Copy full SHA for dc76a5d - Browse repository at this point
Copy the full SHA dc76a5dView commit details -
Encapsulate specifics of throttling operations to the runner
With this, now `amoc_throttle_runner` optimises the different use-cases of the throttling API: executing arbitrary code, sending a payload, or blocking the caller.
Configuration menu - View commit details
-
Copy full SHA for 3959d8d - Browse repository at this point
Copy the full SHA 3959d8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8670b75 - Browse repository at this point
Copy the full SHA 8670b75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e25a29 - Browse repository at this point
Copy the full SHA 1e25a29View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce5dde6 - Browse repository at this point
Copy the full SHA ce5dde6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5060d89 - Browse repository at this point
Copy the full SHA 5060d89View commit details
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.