Online + offline meteor app and db sync

Hi,

I am planning on developing a meteor POS app for a restaurant that would be deployed on a cloud based server (AWS/Digital Ocean). There would also be an e-Menu (iPad/Android Tablet) based component that would allow a customer in the restaurant to send orders from e-Menu tablet to the POS. There will also be an iOS and Android app that would allow the user to place order online (from home) and that order would appear in the POS.

How would I go about setting up the server infrastructure keeping in mind that the internet connection at the restaurant could go down? I imagine that I would need a local server and a remote/cloud based server but how would the dbs keep in sync. ?

I am aware of mongo replica sets but I am not sure if this is the way to go. If so, which of the two servers (local and remote) would connect to which replica set?

Thanks.

Try to use this approach: Offline app with Meteor and Cordova

Hi masv,

Thanks for the answer. However, I do not think this approach applies to the situation I have mentioned in my question. Inside the restaurant where would always be a local server (I imagine) and as such the eMenu tablet/iPad which will be used on the local network will not need GroundDB. The main question here is how to keep the in-restaurant/local db in sync with the db in the cloud once the internet connection resumes.

Cheers.

It’s not a meteor way, but you can use CRDT synchronization framework like Swarm.js but it looks little overhead in your case.