Does Dexie Cloud support partial sync of large databases? #1746
-
It's unclear from the documentation, but if a database is too large to completely store inside the browser--or if a database is larger than the user wants to store in the browser--does Dexie Cloud support partially syncing a database? E.g. if you had a messaging app with thousands of posts, maybe you only sync posts from the most recent year to the client? A client wishing to view older posts would then need to request them from the server. I imagine a custom implementation of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That request is a valid one and it's part of my vision, but not yet possible with Dexie Cloud. My thoughts around this have been to have an optional configuration per table providing an index and a range/expression for offline data that could be relative to current date, for example if there's an indexed property There are also other possible hybrid cases, such as syncing data on-demand only and then keep everything in sync until it haven't been requested for that has been requested during the last month. Current version will sync everything that the user has access to. I use it personally with an app that have more than 8 years of historical detailed time tracking data with minute-detailed activities (4-5 activites per day). This data is taking no more than 13 MB in total, which is no problem for the browser to store. Browser can store at least 500 MB also on smaller devices but initial sync may take long time when connecting a new browser or device. Use cases for Dexie Cloud is mostly private/shared data. Apps such as diaries, todo apps, chat apps, note taking apps, etc and not so much cases with large amount of data that could exceed gigabytes. But when Dexie Cloud has the optional "on-demand syncing" and also your request of range-based offline data, it would be valid also for use cases with loads of public data such as blogs, documentation pages, courses etc. I could not tell when these features would be available though, but I view them as essential parts of the whole vision and hopefully before anyones data grow that much. |
Beta Was this translation helpful? Give feedback.
That request is a valid one and it's part of my vision, but not yet possible with Dexie Cloud. My thoughts around this have been to have an optional configuration per table providing an index and a range/expression for offline data that could be relative to current date, for example if there's an indexed property
creationDate
on theposts
table, the range/expression would be creationDate >= (currentDate - 1 year) for example. Ranges could also be non-date criterias.There are also other possible hybrid cases, such as syncing data on-demand only and then keep everything in sync until it haven't been requested for that has been requested during the last month.
Current version will sync ever…