Move the aggregator logic back into the worker#756
Merged
Conversation
8245283 to
cf9707f
Compare
cjpatton
approved these changes
Jan 7, 2025
Contributor
cjpatton
left a comment
There was a problem hiding this comment.
Minor comments only. Thanks for the super thorough description!
cf9707f to
61bb8f7
Compare
61bb8f7 to
69adc1d
Compare
69adc1d to
859e80e
Compare
This file contains hidden or 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
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.
In order to implement the async change in draft 13 we want to make use of worker queues, to simplify the codebase we elected to get rid of the storage proxy. In order to go from something like
to something like
This PR copies code from
daphne-servertodaphne-workerunder the directorysrc/aggregatorin order to move the routing logic back into the worker. In the future PR the CPU intensive bits will be delegated to a new route in the daphne-server.Because github can't provide a diff between existing files and brand new files I made a small script to generate the "real diff" to ease review of the code.
Differences in crates/daphne-worker/src/aggregator/metrics.rs
Differences in crates/daphne-worker/src/aggregator/mod.rs
Differences in crates/daphne-worker/src/aggregator/config.rs
Differences in crates/daphne-worker/src/aggregator/router/test_routes.rs
Differences in crates/daphne-worker/src/aggregator/router/extractor.rs
Differences in crates/daphne-worker/src/aggregator/router/mod.rs
Differences in crates/daphne-worker/src/aggregator/router/helper.rs
Differences in crates/daphne-worker/src/aggregator/roles/leader.rs
Differences in crates/daphne-worker/src/aggregator/roles/aggregator.rs
Differences in crates/daphne-worker/src/aggregator/roles/mod.rs
Differences in crates/daphne-worker/src/aggregator/roles/helper.rs
everything inside
daphne-worker/src/storageis new and it serves as a substitute for thedaphne-server/src/storage-proxy-connectionmodule.Differences in crates/daphne-worker/src/storage/mod.rs
Differences in crates/daphne-worker/src/storage/kv/mod.rs
Differences in crates/daphne-worker/src/storage/kv/cache.rs
NOTE: CI fails due to me including a test SINGING_KEY for the aggregator worker