-
Notifications
You must be signed in to change notification settings - Fork 9
Split ct_worker into ct_worker and generic_log_worker
#49
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
Conversation
…ct_api dep from old ct_worker
… specify extension in tlog_tiles signing
lukevalenta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! Leaving comments so far and I'll finish the review tomorrow.
| // The number of entries in the short-term deduplication cache. | ||
| // This cache provides a secondary deduplication layer to bridge the gap in KV's eventual consistency. | ||
| // It should hold at least <maximum-entries-per-second> x <kv-eventual-consistency-time (60s)> entries. | ||
| const MEMORY_CACHE_SIZE: usize = 300_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: probably want to add this to the app/log config.
|
I pushed a commit that makes some of the changes you suggested. Let me know if I interpreted correctly. If so, I gotta do some cleanup. It have two TODOs in there though that I could use feedback on:
|
* Move app config package back to ct_worker. The justification here is that each application is going to need to manage its own schema, and the AppConfig struct is directly used for parsing that config. * Add SequencerConfig (renamed from LogConfig) and BatcherConfig with options that are relevant for generic sequencers and batchers. * Rename Metrics -> SequencerMetrics * Construct the metrics registry in the app-specific code and pass it in to the Sequencer constructor. This allows apps to registry their own custom metrics, if desired. * Use [event(start)] for initializing logging and panic handling. This is the first thing that runs when the wasm is loaded. * Make the `new()` methods for GenericSequencer and GenericBatcher infallible, and handle the errors (by panicing, which is all we can really do) in the calling app.
In my edits I made GenericSequencer::new() infallible, and just panic in
The basic idea is that we have an allowlist of log names in the configuration, and every entrypoint must check |
|
Ah ok then. This makes a lot of sense. Agreed on your edits! |
This one looks like a lot but it's mostly just moving stuff around. I recommend reading commit-by-commit.
Some open problems:
config_rootsfrom the sequencer's metrics, since the generic sequencer knows nothing about roots. Not sure what the best way to fix that is.ObjectBackendasync trait. Apparently exporting async traits is a warning:Also, I'm not sure if I made the right cut on the API. I think the contents of
ct_worker/src/frontend_worker.rscould be more succinct. Curious to hear what you think!Finally, the readme for the generic log sequencer is mostly a copy of the CT one. I could use help adding to it if you think it should have more.