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

Create adapters as singleton objects instead of classes #961

Closed
beckjake opened this issue Aug 29, 2018 · 0 comments
Closed

Create adapters as singleton objects instead of classes #961

beckjake opened this issue Aug 29, 2018 · 0 comments
Assignees
Milestone

Comments

@beckjake
Copy link
Contributor

beckjake commented Aug 29, 2018

Feature

Instead of being used as bare classes, adapters should be instantiated as singleton objects at run start-time.

Feature description

With adapters being instantiated as objects, we could attach connections to the object instead of in global state. We would also store the configuration on there, and not need the database wrapper logic we currently have, and not need to pass around profile/project information throughout the code. Ideally we would reach the point of not even needing a true singleton, and instead pass an adapter object around to anything that needs it - but that is a much larger task that we can reasonably handle separately.

Depends on #953 and #960

Who will this benefit?

Developers, developers, developers! This is fairly foundational for making adapters cache table metadata, as we need a reasonable place to store the cache. And in the further future, this will make it a lot easier to establish an adapters-as-plugins model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants