Jump to content

(Archived) synchronization

Recommended Posts

Could you please point me to some info as to how your sychronization works please?

Currently I am assuming that the most recent timestamped change is the master and the earlier timestamped items are synced to that. However how does that work with a restore to a backup where the backup is to be used as the master but obviously has earlier timestamps than the server version? I am primarily thinking here of cases when the server version is corrupt or when a change has been made to the synced system which needs to be reversed.

Also is there any way of restoring specific notes from the server? Say if a note has been deleted then instead of deleteing the server-side note it can be restored.


Link to comment

Our synchronization scheme is similar to what you see in a client-server mail system (e.g. IMAP). Under this scheme, the server is always "right" ... it is the definitive answer about what is in your account, in the same way that a mail server is authoritative about what's in a mail box.

When a client syncs, it always gets the list of new changes from the server first, and then it reconciles them locally. This means that the client sees about any conflicting changes first, and may locally resolve them by putting the conflicting local note into a "Conflicts" directory so you don't lose your data. This would only happen if you changed the same note from two different systems before synchronizing, however.

Once the client finishes resolving updates from the server, it asks the server to make a set of updates. For each update, the server verifies that the change will leave your server account in a valid state. I.e. the server won't let you delete a notebook and then upload a note that goes into that notebook. This means that problems are reported on the client, but the server version of your account is not corrupted (unless there's a significant bug).

If you want to make a copy of your notes for local storage, you can use the "Export" feature of either client. You could later import these notes back into your account, but they would be copies of the originals ... they wouldn't affect the original notes.

Link to comment

Thanks for the explanation.

Would I be able to differenciate which note was from the import and which was original? Also with 1000's of notes would I be able to easily delete the duplicates (or maybe filter them out before adding to the db) so that I was only manually dealing with changed notes?

It seems that you are not advocating making straight backups of the database then. Is that correct?

Link to comment

You should never get 1000 conflicts in a single sync unless you really worked at it by using two clients, avoiding all synchronization and manually making changes to 1000 different notes that would conflict.

I.e. the conflicts aren't generated by anything that we're doing on the service ourselves, these would come from your own activity on multiple different clients/interfaces without synching first.

The locally edited version of the note always goes into a local "Conflicts" notebook on your computer, and the definitive one from the service goes into the "normal" place in its notebook. I.e. the server wins.

You're definitely welcome to do your own backups of your local database file(s), or to export copies of your notes or notebooks to .enex files for import later. The export files, in particular, could be useful if you made a change that you later regretted. But this isn't strictly necessary.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...