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

Factories for configuration constructables #1228

Open
pontus-lund opened this issue Sep 6, 2023 · 2 comments
Open

Factories for configuration constructables #1228

pontus-lund opened this issue Sep 6, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@pontus-lund
Copy link

Feature Request

This comes from my own effort at a cheapskate persistent cache (driven by gdbm, as I don't like the cost of redis on AWS).

Many implementations of configurable components in the code base leave little room for adding custom implementations. This could be relieved by introducing factories where the user can register a new implementation of a component.

Right now I have to edit kernel.py to make use of my cheapskate cachedb, which is less than ideal, and it allows package users no non-cowboyish recourse if they want to introduce custom components.

@pontus-lund pontus-lund added the enhancement New feature or request label Sep 6, 2023
@cjdsellers
Copy link
Member

cjdsellers commented Sep 8, 2023

Hi @pontus-lund

Thanks for the feedback here. Were you aware of the CacheDatabase facade/interface, which just needs implementing to add different underlying technologies, I think then all we would need is a way to register this alternative impl which I think is what you're getting at with the factories? Then the CacheDatabaseConfig could name it as a type.

There's several places where we do have extension hook points, allow custom component registration and use factories, Account is one example of this.

@pontus-lund
Copy link
Author

Correct, that is what I am looking for. And good pointer on Account, I have been wondering about that one a bit lately!

@cjdsellers cjdsellers self-assigned this Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants