modify sync code to support non-sync engines

RESOLVED INVALID

Status

Cloud Services
Firefox Sync: Backend
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: glasserc, Assigned: glasserc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

2 years ago
Per bug 1253741 and specifically :markh's comment in https://bugzilla.mozilla.org/show_bug.cgi?id=1253741#c9, the storage.sync extension would like to slot in to the sync code somehow so that it can take advantage of the user interface and event loop that already exist. Because the storage.sync extension implementation is based on Kinto, the sync logic itself will not be shared. This bug represents code changes necessary to make Sync be "less opinionated about how abstract 'engines' do what they do".
(Assignee)

Updated

2 years ago
Assignee: nobody → eglassercamp
(Assignee)

Updated

2 years ago
Blocks: 1253741
(Assignee)

Comment 1

2 years ago
OK, I spent a couple hours poring over the sync code, anticipating a need to separate out the parts of the sync engine code that wouldn't apply to Kinto. I looked at enginesync.js, and there's a lot of stuff there that doesn't seem directly relevant. Even so, it seems like even if we add a Kinto engine, we still need to do almost everything that we do now, because we will always need to sync `clientEngine`. The actual syncing logic itself is dispatched to the engine itself; I think a storage.sync engine would only have to override the `_sync()` method and everything should work OK. In fact, because Kinto sync has some commonalities with Firefox Sync, I might even be able to override the individual `_syncStartup`, `_processIncoming`, `_uploadOutgoing`, `_syncFinish`, and `_syncCleanup` methods. Either way, I think I can close this issue as INVALID.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.