Hello, please advise.
I have written a meteor app that I now need to enhance to run in offline mode. Essentially the offline data collection will be happening on a mobile device in the field with no connectivity to the Internet and will have to sync up to a server when Internet connectivity is available.
What would the best way be to handle this, my data is currently being stored in mongo db. I’ve heard that I might need to migrate to pouch db to store data in offline mode.
Also, my question is, if data is captured on the server side, how will I sync back down to the mobile device, this is in instances where perhaps the data collection form has changed.
Any advice to steer me in the right direction will be most appreciated, thanks guys.
If you speak about webapp, you will have to use local storage to permanently(not actually) store data.
Database doesn’t matter on client-side, its not operated here. On client you take advantage of minimongo.
Meteor does tries sending keep-alive requests, and delay any queries and methods towards server until connection is estabilished. So there’s no problem of temporal connection loss.
And web apps aren’t really made for full offline mode.
You didn’t describe your problem well, I suppose.
If you made an app, real local app with access to file-storage - think of manual ways to store data.
If you made a webapp, however, you don’t have to do anything.
Meteor will sync as soon as connection restored.
hi, yes, thank you very much for your advice.
It is indeed a webapp but what I’m struggling to wrap my head around is if the data will be cached on the mobile device to a minimongo db and then later when connectivity is restored sync with the mongo db server.
Is minimongo a localstorage db, similiar to SQLlie or IndexDB.
Sorry I’m pretty new to the meteor framework.
Did you already take a look at GroundDB?
Hi no not yet but it looks like grounddb might be the way to go… I will inveastigate that some more.