-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Sync Local and Remote Database #1095
Comments
i dont understand |
This is the configuration code. The client server is a local server that you access while offline. The server is a remote server that you access while online. |
1st Image - After sync, Kelly Swift was downloaded from remote to local, but not the rest. |
Something I noticed is that you have the conflict resolution policy set to "ClientWins", but all your tables are "DownloadOnly". So there never will be any conflicts, since no data from the local database will be uploaded. As for the differences in data, did you insert new data or edit the details of existing records? If you inserted new ones, what happened to the old ones? Were they deleted? |
I used "ClientWins" with download only because on my first try i went with the standard settings (both ways with "ServerWins") and the local DB would lose data.
So i thought since most of the time there will be no internet loss, the online database can just send updates to the offline database to keep it updated. The issue comes when someone goes offline and there is someone updating the online server, because if the offline data update was done after the online, since the "Client Wins" the offline server will not be updated and will lose this data as shown on the pictures above. (By lost data here i don't mean it was deleted but it was lost because the offline database did not downloaded that data.) The project is like a Hospital database, it needs to work both online and offline, and both databases should be synced without loss of data. Ex: a patient that was added in Hospital1 offline, the Hospital2 online needs to get that information when the Hospital1 becomes online again. The patient can't be deleted. And vice versa. A change that the online Hospital2 did, the offline database from Hospital1 needs to receive when it goes online. Sorry if it feels confusing. |
I'm sorry, can't help you here. |
Hi, i'm having trouble when trying to Sync a local and remote database.
Normally the remote database is used while online, with the local used while offline.
I have a code that uses the remote as server, local as client, only download with client wins, so the client can work as a backup in case the internet goes down.
The problem is, if someone else updates the online database with new row while i update the offline with new roles, when the internet comes back and the sync happens, not all updates from the online database comes, only the ones made after the last offline update.
How can i fix this issue?
Thanks for the attention
The text was updated successfully, but these errors were encountered: