4 ms·
Firebase's whole premise is seamless syncing between locally cached data and your backend. If you "just use Postgres", life is simpler until your user goes off
by resolutebat 3y ago
Firebase's whole premise is seamless syncing between locally cached data and your backend. If you "just use Postgres", life is simpler until your user goes offline/runs out of mobile data/whatever, and then they're immediately screwed.
- joshspankit 3y agoThis is the exact use-case I want to optimize for. Offline-first with robust and seamless syncing. Firebase keeps promising it but I would love to find more transparent tools that work better on mobile + web.
- quickthrower2 3y agoI feel this needs a framework (not a library) to take care of it all. Abstract away the webbyness. Something like Elm, with a type that represents data, and behind the scenes it does all the ServiceWorker and syncing crap for you.
- sroussey 3y agohttps://electric-sql.com/ https://electric-sql.com/ https://www.powersync.com https://www.powersync.com https://watermelondb.dev https://watermelondb.dev https://replicache.dev https://replicache.dev
- joshspankit 3y agoDo you have direct experience with any of these and especially experience using them with mobile offline-first + sync?
- lukevp 3y agoMost apps are online by default these days and don’t even gracefully degrade without internet. Firebase does have the offline DB, but it had a ton of more features and I wouldn’t say the offline db is the only selling point of FB.
- btown 3y agohttps://supabase.com/blog/react-native-offline-first-watermelon-db https://supabase.com/blog/react-native-offline-first-waterme... may be of interest. https://supabase.com/blog/postgres-crdt https://supabase.com/blog/postgres-crdt seems to be abandoned but would be the next logical step beyond this.
- ochiba 3y agoIt's worth noting that Firebase doesn't have a true offline-first architecture, but rather cloud-first: By default, queries run against the cloud and results of those specific queries are temporarily cached on the client. By default Firestore will try to reach the server first before falling back to the local cache, which can result in a subpar UX on a patch network connection. It does also provide store-and-forward of updates from client to server. But it's not a true offline-first architecture since it does not preemptively sync a database to the local user device for offline-by-default access. Regarding Postgres, that is where tools like PowerSync (disclosure: co-founder) and ElectricSQL are useful, which are both sync layers for Postgres for offline-first architecture.