Offline usage / data sync Xano
Hi all,
We are prepping to implement offline usage to our Draftbit app - our BE runs on Xano. To enable offline usage we are considering WatermelonDB. Question now is - who has experience using Xano in combination with a FE that allows offline usage (thus requiring pulling and pushing data to sync FE and BE);
- Which sync method you've applied (timestamp, order number, …)
- Consideration of using row locking, diffing, …
Any help / input is much appreciated and very welcome!
Ben
Answers
-
I am not an expert, but I can weigh in and say that the
date_modified
column of any record should be considered, where we only update & create records that have been stored in the localStorage after alast online
timestamp has been created.
To answer your first question, I would use a timestamp.
To answer your second question, it depends largely on the data that you're updating/creating. Is this a record that is specific to quantity? I would ensure that before the data is synced, we make an active check - if the user, offline, 'ordered' an item with a stock quantity value of 1, but online someone already purchased this item, we can't send a request to purchase this item once the user is back online. We have to check if the values exist first and then perform the requests.
I hope that this information makes sense, but it's an interesting challenge to overcome. Let me know what else you're wondering. Thanks!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback