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: add dao layer #2276

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

feat: add dao layer #2276

wants to merge 4 commits into from

Conversation

TheoPascoli
Copy link
Contributor

@TheoPascoli TheoPascoli commented Dec 19, 2024

This PR is a second iteration of a previous one #2248 , which I'm about to close because it is too complex to modify.

I am implementing a DAO (Data Access Object) layer between the business layer (manager) and the storage layer. Additionally, I have implemented a caching logic to accelerate data retrieval, reducing the overhead of fetching frequently accessed data directly from the storage layer.

The goal is to create a clean separation of concerns, allowing the business logic to interact with the data through well-defined interfaces. This approach will make it easier to:

  • Support additional storage systems (e.g., PostgreSQL, Redis, or others) by simply extending the DAO implementations
  • Centralize and encapsulate data retrieval and manipulation logic, reducing duplication and improving maintainability
  • Using caching to enhance performance for read-heavy operations

One of the next steps is to reverse the current behavior of the commands. Instead of having the StorageDAO call the commands, I want the commands to directly invoke the DAOs. This inversion will improve modularity and make the system more flexible to extend or modify in the future.

If you have suggestions or see potential improvements, feel free to share them

@TheoPascoli TheoPascoli force-pushed the feat/poc-add-dao-layer-v2 branch from a321f3a to 3452503 Compare December 19, 2024 13:48
@TheoPascoli TheoPascoli force-pushed the feat/poc-add-dao-layer-v2 branch from 41a8416 to 71e988b Compare December 23, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant