API syncing megacommit

There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
This commit is contained in:
Dan Stillman 2015-07-20 17:27:55 -04:00
parent b4a8083f2f
commit 984789d304
27 changed files with 6058 additions and 1149 deletions

View file

@ -95,6 +95,12 @@ const xpcomFilesLocal = [
'server',
'style',
'sync',
'sync/syncAPIClient',
'sync/syncEngine',
'sync/syncEventListeners',
'sync/syncLocal',
'sync/syncRunner',
'sync/syncUtilities',
'storage',
'storage/streamListener',
'storage/queueManager',