DEV Community

Discussion on: How I designed an offline-first app. An outline.

Collapse
 
ash_grover profile image
Ash G

Changeset ID is just a randomly generated ID, not content hashes. Firestore offline persistence stores data in a temporary cache, and as cache becomes larger Firestore queries become slower. Its more of an offline-tolerant than offline-first. Therefore I built a custom sync solution for both desktop and mobile app.

Collapse
 
trailrun80 profile image
trailrun80

You actually tried that? How large of a cache before queries got slow? I'm just trying to figure out the easiest way to implement "decent" offline support with some conflict resolution. I thought Firebase had it all solved..

Thread Thread
 
ash_grover profile image
Ash G

No, I didn't test it out but you might want to read this stackoverflow post and this Firebase blog post. It might give you some insights about Firestore's offline persistence. Firestore offline persistence is great if your app's users are temporarily going offline.

The app I built is not offline-tolerant, its an offline-first app with a local database. It does not need an account or an internet to fully function so in my case building my own solution made sense. Your app might have different needs depending on the use-cases.

Thread Thread
 
trailrun80 profile image
trailrun80

thank you