Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sync database with remote database with Dexie

I making Notes PWA App that work offline and online.

I am saving notes records on IndexedDB with Dexie.js. I am using Quasar as frontend and backend as Laravel 8.

I want to sync IndexedDB Database with remote database. How can I do?

like image 394
Abdul Basit Avatar asked Sep 15 '25 03:09

Abdul Basit


1 Answers

  1. Look at Dexie Cloud - David has worked this out for Postgres.

  2. If you want to write your own, it is a LOT MORE WORK than you think. We wrote our own to work with SQL Server and C#
    (it is proprietary, I can't share it) Months later, we are still finding edge cases - there are many edge cases.

  3. If you still want to write your own, you are probably mistaken..

  4. If records can be created client side - use GUID identifiers

  5. If it is an existing database with integer identifiers, add a GUID identifier field.

  6. Set aside a few months of time to work out the rest.

like image 82
Michael Cummings Avatar answered Sep 17 '25 19:09

Michael Cummings