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

Persistent cache system #7

Closed
BenHenning opened this issue Aug 2, 2019 · 7 comments
Closed

Persistent cache system #7

BenHenning opened this issue Aug 2, 2019 · 7 comments
Assignees
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

A replacement is needed to SharedPreferences for storing settings and generally caching data since SharedPreferences executes on the main thread which can block the UI rendering and cause ANRs. It's instead recommended to use a proto-backed storage mechanism that relies on background threads (likely via the threading library described below) to perform the I/O. Using proto allows the data structure to be trivially updated to a new structure upon app update without requiring an upgrade flow. Such a system should be strict-mode compliant (that is, does not perform any I/O or long-running operations on the main thread).

@BenHenning BenHenning added Type: Improvement Priority: Essential This work item must be completed for its milestone. labels Aug 2, 2019
@BenHenning BenHenning added this to the Proof of concept milestone Aug 2, 2019
@BenHenning
Copy link
Member Author

This is blocked on #4.

@BenHenning
Copy link
Member Author

Also: we intend to use this system for storing the topic list rather than moving it to sqlite (for now) to keep things simpler. For later topic searching, we may want to move these structures to sqlite.

@BenHenning
Copy link
Member Author

Open question: will this solution be sufficient for a no-sql-esque storage for the prototype and maybe even the MVP?

@BenHenning
Copy link
Member Author

This is also blocked on #6.

@BenHenning BenHenning changed the title Persistent cache system Persistent cache system [Blocked: #4, #6] Aug 12, 2019
@BenHenning BenHenning self-assigned this Aug 23, 2019
@BenHenning
Copy link
Member Author

Because of #86, this can be pushed back to prototype. The initial iteration of this will be done as part of proof-of-concept.

@BenHenning BenHenning modified the milestones: Proof of concept, Prototype Sep 1, 2019
@BenHenning BenHenning changed the title Persistent cache system [Blocked: #4, #6] Persistent cache system [Blocked: #4, #6, #86] Sep 1, 2019
@BenHenning
Copy link
Member Author

This is blocked on #86.

@BenHenning BenHenning changed the title Persistent cache system [Blocked: #4, #6, #86] Persistent cache system [Blocked: #6, #86] Sep 5, 2019
@BenHenning BenHenning changed the title Persistent cache system [Blocked: #6, #86] Persistent cache system [Blocked: #6] Sep 5, 2019
@BenHenning
Copy link
Member Author

This is essentially complete. There are improvements that can be made (many of which are noted as an extension to add network support per #103), but the core utility works reasonably well and will need to be stabilized in the coming months.

@BenHenning BenHenning changed the title Persistent cache system [Blocked: #6] Persistent cache system Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

No branches or pull requests

1 participant