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

feat: persistance layer #58

Closed
oSumAtrIX opened this issue Aug 10, 2023 · 3 comments · Fixed by #102
Closed

feat: persistance layer #58

oSumAtrIX opened this issue Aug 10, 2023 · 3 comments · Fixed by #102
Assignees
Labels
Feature request Requesting a new feature that's not implemented yet

Comments

@oSumAtrIX
Copy link
Member

About

The API has been designed to be entirely static, which is why an in-memory database is currently used. Because of upcoming features such as #42 this design may be problematic.

Solution

An interface must be introduced that allows swapping the persistence layer. Along the in-memory, an on-disk persistence layer implementation for the interface must be provided that can be chosen at build time or via a configuration file.

Additional context

The ability to migrate between the interfaces may exist.

@oSumAtrIX oSumAtrIX added the Feature request Requesting a new feature that's not implemented yet label Aug 10, 2023
@oSumAtrIX oSumAtrIX moved this to 📋 Backlog in Development of ReVanced Aug 10, 2023
@alexandreteles
Copy link
Contributor

There is no persistence layer in the API itself now; the cache is handled at the proxy level. The persistence layer would be used by endpoints like /announcements and /changelogs I suppose? If so, I might need to take care of that issue before I delve into this one.

@oSumAtrIX
Copy link
Member Author

oSumAtrIX commented Aug 16, 2023

The persistence layer should be introduced with an abstraction layer that allows switching out of the implementation as long as it follows the designed interface as specified in the issue description:

An interface must be introduced that allows swapping the persistence layer. Along the in-memory, an on-disk persistence layer implementation for the interface must be provided that can be chosen at build time or via a configuration file.

Use cases of this feature would allow introducing of other features as described:

Upcoming features such as #42

@alexandreteles
Copy link
Contributor

Yeah, that's what I thought. This will be quite a significant feature, and I don't feel like writing and maintaining an ORM for ReVanced, so I might default to Alchemy and write the abstraction on top of it using a relational approach. I will need some time to consider this carefully.

@alexandreteles alexandreteles moved this from 📋 Backlog to 🏗 In progress in Development of ReVanced Sep 27, 2023
@oSumAtrIX oSumAtrIX linked a pull request Sep 29, 2023 that will close this issue
4 tasks
@oSumAtrIX oSumAtrIX removed a link to a pull request Sep 29, 2023
4 tasks
@alexandreteles alexandreteles linked a pull request Oct 11, 2023 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Development of ReVanced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Requesting a new feature that's not implemented yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants