Move storage into an Sqlite Backend instead of Json files.
Would be nice to have an Sqlite db instead of storing the messages into. I am willing to work on that and this issue is mainly to keep track of it. The Sql ORM that will be used will be diesle.
Proposed Mockups:
The tables proposed are:
- A message table that would map the Message struct
- A Room struck that would map the Room struct
- A Pagination table that will group messages as defined in the docs
Design Tasks
-
Design the DB schema. -
Design the caching way, and decide if we will use the Serialized Json structs for caching or query straight from the db.
Development Tasks
-
Create the db and the Diesel migrations. -
Create the Diesel models. -
Right setters and getters in order to make the struct fields private. -
Make a prototype that will use the Db instead of the Serialized json structs. -
Refactor so Diesel and Json Models could be used seamlessly if Json structs are kept.
QA Tasks
-
Assert that chat still works pretty match.