Firefox OS Data Sync: Difference between revisions

→‎Roadmap brainstorm (subject to change): Update current status and link to main Roadmap page
(→‎Toolkit team: Add mailing list)
(→‎Roadmap brainstorm (subject to change): Update current status and link to main Roadmap page)
Line 137: Line 137:


= Roadmap brainstorm (subject to change) =
= Roadmap brainstorm (subject to change) =
== Before 2.5 RA ==
== Current work ==
=== Firefox Sync on 2.5 ===
=== Firefox Sync support ===
We plan to implement readonly bookmarks and history synchronization. TV will be shipping with a 2.5 version with Firefox Sync enabled. We will be enabling Sync on master for phone foxfooders after the 2.5 branch is created.
We have implemented import-only bookmarks and history synchronization for the Smart TV in FxOS 2.5. We will be enabling FxSync on master for phone foxfooders soon.


== After 2.5 RA ==
=== Finish Firefox Sync ===
The next logical step is to finish the work that we started with Firefox Sync in a way that Firefox OS can catch up with other Firefox Sync clients (Desktop, Android and iOS). So we need to work on exporting data from the collections that we already have implemented (bookmarks and history) and work on importing/exporting from the collections that it still doesn't have (passwords, add-ons, tabs, preferences, forms, clients). Some of these may not make sense on Firefox OS though.
The next logical step is to finish the work that we started with Firefox Sync in a way that Firefox OS can catch up with other Firefox Sync clients (Desktop, Android and iOS). So we need to work on exporting data from the collections that we already have implemented (bookmarks and history) and work on importing/exporting from the collections that it still doesn't have (passwords, add-ons, tabs, preferences, forms, clients). Some of these may not make sense on Firefox OS though.


Line 149: Line 147:
Finally, we need to allow the creation of new Sync users from Firefox OS. This involves generating the 'crypto/keys' object containing a new bulk key bundle, encrypt it with 'kB' on the client and uploading it to the server.
Finally, we need to allow the creation of new Sync users from Firefox OS. This involves generating the 'crypto/keys' object containing a new bulk key bundle, encrypt it with 'kB' on the client and uploading it to the server.


== Planned Work ==
See: [https://wiki.mozilla.org/Firefox_OS_Cloud_Roadmap Firefox OS Cloud Roadmap]
== Ideas for Architecture Improvements ==
=== SyncEngine shared library ===
=== SyncEngine shared library ===
Right now, the sync engine lives only inside the Sync app that we added for synchronizing bookmarks and history. This works fine as long as the data source to be synchronized is accessible outside of the owner app (via DataStore for example). But it makes it impossible to synchronize an app's data that is not exposed outside of the owner app. Also, having the Sync app managing the synchronization of any kind of data doesn't really scale very well and causes potentially unnecessary data duplication. It makes more sense that each app handles the synchronization of its own data. So in order to allow the addition of new collections (not only existing Firefox Sync collections, but also any other type of collection like contacts, call log or settings data) from any application we need to package the logic of the sync engine in the form of a shared library that can be used by any Gaia application.
Right now, the sync engine lives only inside the Sync app that we added for synchronizing bookmarks and history. This works fine as long as the data source to be synchronized is accessible outside of the owner app (via DataStore for example). But it makes it impossible to synchronize an app's data that is not exposed outside of the owner app. Also, having the Sync app managing the synchronization of any kind of data doesn't really scale very well and causes potentially unnecessary data duplication. It makes more sense that each app handles the synchronization of its own data. So in order to allow the addition of new collections (not only existing Firefox Sync collections, but also any other type of collection like contacts, call log or settings data) from any application we need to package the logic of the sync engine in the form of a shared library that can be used by any Gaia application.
Line 154: Line 157:
=== Sync collection extension mechanism ===
=== Sync collection extension mechanism ===
Apart from creating this shared library to ease the synchronization process from other apps, we also want to create a way for apps to register themselves in the Firefox Sync machinery. This is, to be able to add their collections to be listed within the Settings UI and to register themselves to be waken up periodically by the sync scheduler that lives in the System app.
Apart from creating this shared library to ease the synchronization process from other apps, we also want to create a way for apps to register themselves in the Firefox Sync machinery. This is, to be able to add their collections to be listed within the Settings UI and to register themselves to be waken up periodically by the sync scheduler that lives in the System app.
=== CryptoKey and CryptoKey Discovery API ===
We want to implement a model where initially the SyncEngine library would use Kinto.js and Syncto to retrieve crypto/keys, pass this encrypted blob to Gecko, and get back a set of non-extractable CryptoKey objects, with which it can decrypt the data from other collections. The communication between Sync app <-> System app <-> Gecko can initially be done via IAC + chrome/content events. However, that's not possible on Firefox Desktop. And we need to be able to decrypt the data that we send from FxOS on Desktop and viceversa so that the same data can be accessed on Desktop and on Firefox OS. For that we need the CryptoKey Discovery API implemented on Gecko, so we can provision kB on Firefox Desktop and expose it to a certain set of associated origins. With that, we would still not have a cross browser solution, so we would need other browser vendors to implement the same API, and have an inter-browser solution for moving the private key between one browser silo and another. Sync used to do something similar between Firefox Desktop and Android where one showed the user a string (or QR code maybe) that needed to be entered in the other.


=== Push notifications in Kinto ===
=== Push notifications in Kinto ===