Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Write guideline for data management #290

Open
HaGuesto opened this issue Jul 9, 2018 · 2 comments
Open

Write guideline for data management #290

HaGuesto opened this issue Jul 9, 2018 · 2 comments
Labels
type/chore Things that don't change the app from a user's point of view, but need to be done

Comments

@HaGuesto
Copy link
Member

HaGuesto commented Jul 9, 2018

Following #275 and #289,
a guide how to download data from firestore collections to local storage, how to update them and query the data locally has to be written.

@rubenspgcavalcante and @bfirsh please correct this issue if I am wrong.

@HaGuesto HaGuesto added the type/chore Things that don't change the app from a user's point of view, but need to be done label Jul 9, 2018
@rubenspgcavalcante
Copy link
Contributor

I still owing you guys a draft of my idea on this case. I'll get some time to work on this ok 👍

@rubenspgcavalcante
Copy link
Contributor

Ok my Idea was this:
untitled diagram

We can get information from firebase in case of the user is online, or just get the entire updated state (a simple JSON stored on localstorage) and use it as our initial state (no queries, no worries).
The observables is a must have to keep the app state up-to-date, so we don't have to do pooling (is horrible to maintain and costs a lot for the device, mainly mobile ones). I need to check on firebase docs further information about this tho.
All the joins we'll be made in our side, as we're going to have this entire information in our app state (redux store). Probably we'll create some aggregators to do the job and a simple HOC to pass this state data already joined.

All in all, this is the idea I was trying to explain on the meeting with @HaGuesto and @bfirsh :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/chore Things that don't change the app from a user's point of view, but need to be done
Projects
None yet
Development

No branches or pull requests

2 participants