Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise syncing with remote repo to reduce network traffic #108

Open
mlandauer opened this issue Apr 19, 2017 · 0 comments
Open

Optimise syncing with remote repo to reduce network traffic #108

mlandauer opened this issue Apr 19, 2017 · 0 comments
Labels

Comments

@mlandauer
Copy link
Owner

Currently we're doing continuous two-way synching which is great from a simplicity point-of-view but pretty bad in terms of battery and network usage.

So, normally just do a synch from remote to local and only do this on startup and every 5 minutes or so.

If the user makes local changes to the database immediately save something in localstorage to say there are outstanding local changes and try to sync local -> remote. If that synch works remove the flag in localstorage. On the normal synch that occurs every 5 minutes or so check if the flag is set in localstorage. If there are outstanding changes then try a two-way synch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant