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

NoSQL #1411

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

NoSQL #1411

wants to merge 10 commits into from

Conversation

thePeras
Copy link
Member

@thePeras thePeras commented Dec 10, 2024

Closes #1391 closes #755

Used Object Box, which is not the ideal approach since it require new annotations on models and don't rely on the existing serialization.

Bus stops remain in sqlite since they are not working and fix code need to be written.

Comparing SQlite and NoSQL

I run a simple experiment to compare the read and initialization times with my personal Exams data (around total 8 exams)

  • The read values are the mean of 5 experiments with the DB already up.
  • The DB initialization values result from 3 experiments, no schema migrations involved.
--- DB initialization Reads
SQLite 19ms 15ms
ObjectBox (NoSQL) 161ms 2ms

Note: The NoSQL db initilization already opens the file used for all models where the SQLite only opens the Exams database

Conclusion

Since we had 9 databases and assuming they all boot up the same time as Exams, sequentially all of them would make 171ms to set up. Base on that, both of the technologies have similar db initialization times for a scenario using all the models (example: homepage with all of possible cards). However, read times were significantly decreased.

@thePeras
Copy link
Member Author

thePeras commented Dec 10, 2024

As discussed in meeting:

  • Close and use isar, remove library ocupation database and move Profile to PreferencesController temporary.

  • Some things of PreferencesController should migrate to database, and Preferences is for Preferences, no more than that.

  • Implement in just one file, database

@thePeras
Copy link
Member Author

thePeras commented Jan 4, 2025

Currently with two files implementation.
Next Step: Join everything in a single singleton class called Database. ✅

@thePeras
Copy link
Member Author

thePeras commented Jan 4, 2025

Configured the Database Interface and added instructions to view it in the readme.

Screenshot 2025-01-04 at 19 04 20

@thePeras thePeras marked this pull request as ready for review January 4, 2025 19:38
@thePeras thePeras requested review from limwa, DGoiana, vitormpp and a team January 4, 2025 19:43
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 0% with 132 lines in your changes missing coverage. Please review.

Project coverage is 12%. Comparing base (b784754) to head (03ddb21).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #1411    +/-   ##
========================================
+ Coverage       12%     12%    +1%     
========================================
  Files          265     258     -7     
  Lines         7382    7189   -193     
========================================
  Hits           819     819            
+ Misses        6563    6370   -193     

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

Successfully merging this pull request may close these issues.

Switch LocalStorage from SQLite to a NoSQL database Migrate current databases to NoSQL
1 participant