-
Notifications
You must be signed in to change notification settings - Fork 501
[API] Refactor: core cache design and impl #878
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
7d19bbe to
6b186ea
Compare
|
@zhangjyr is also working on same implementation. |
|
@varungup90 is there a PR for it? |
|
This refactor does not break the previous usage for cache pkg, just improve the code maintainability, which I think is not conflict with the #868. |
|
@Xunzhuo that's even better. I will take a look tomorrow |
c840175 to
4619847
Compare
Signed-off-by: bitliu <[email protected]>
|
CI has passed, plz help review @varungup90 @Jeffwan |
|
@Xunzhuo I reviewed the PR, and the refactor looks straightforward with a few key changes:
These changes improve maintainability, especially for new contributors. Let me know if there are any specific areas you'd like me to focus on. BTW, Feel free to write key changes in the PR description next time. Consider it changes a lots of files, I would like to fetch the branch and spend some time to double test the new code structure before merging. I will come back with some results soon |
|
Thanks for the PR. I have reviewed the new interfaces. Decoupling different cache data providers is necessary. However, PodCache and ModelCache should be unified as one interface, as they solely depend on pod information. We should maintain the atomicity of updating pod metadata, model(adapter) metadata, and their relation. Another thing I need to clarify is that RequestCount series methods store real-time workload statistics, which are distinguished from cached metrics pulled from other data sources. I would suggest either:
The cache and routing part will be refactored to improve concurrent access in #884 |
@zhangjyr The informer code remains the same, I think it's still pod change driven. PodCache and ModelCache are two logical interfaces that only provides Get/List capabilities. Atomicity should be good. |
|
@Jeffwan Yep, that's what I originally think. |
Thanks, it's most of the refactor key points. I will create a clear issue and PR description in later works. |
@Jeffwan I see your point. The proposal interfaces only defined the read operations. The data provisioning currently is still intact. I think we can merge the PR after #884 merged. |
refactor: core cache design and impl Signed-off-by: bitliu <[email protected]>
refactor: core cache design and impl Signed-off-by: bitliu <[email protected]>
Pull Request Description
refactor: core cache desgin and impl
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]: Corrections to existing functionality[CI]: Changes to build process or CI pipeline[Docs]: Updates or additions to documentation[API]: Modifications to aibrix's API or interface[CLI]: Changes or additions to the Command Line Interface[Misc]: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.