Places:Sync: Difference between revisions

Jump to navigation Jump to search
Line 75: Line 75:
Our specific needs will depend on which flavor of online backup we wish to implement (full dump vs deltas).  In the full dump case, we'd only need PUT.  For deltas, we could do something like:
Our specific needs will depend on which flavor of online backup we wish to implement (full dump vs deltas).  In the full dump case, we'd only need PUT.  For deltas, we could do something like:


* LOCK the bookmarks collection
* If the bookmarks file and the deltas file haven't changed:
* If the bookmarks file and the deltas file haven't changed:
** GET the deltas file
** GET the deltas file
Line 80: Line 81:
* Else:
* Else:
* PUT new bookmarks file, PUT empty deltas file
* PUT new bookmarks file, PUT empty deltas file
* UNLOCK the bookmarks collection


Determining the latest changes requires some of the same things that sync needs.  Either we must keep track of changes by logging them, or we need to keep a snapshot of the tree at the time of last sync and "diff" (e.g., see sync.js).
Determining the latest changes requires some of the same things that sync needs.  Either we must keep track of changes by logging them, or we need to keep a snapshot of the tree at the time of last sync and "diff" (e.g., see sync.js).
946

edits

Navigation menu