summaryrefslogtreecommitdiffstats
path: root/services/cloudsync/docs/architecture.rst
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /services/cloudsync/docs/architecture.rst
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'services/cloudsync/docs/architecture.rst')
-rw-r--r--services/cloudsync/docs/architecture.rst54
1 files changed, 54 insertions, 0 deletions
diff --git a/services/cloudsync/docs/architecture.rst b/services/cloudsync/docs/architecture.rst
new file mode 100644
index 000000000..a7a8aa7ba
--- /dev/null
+++ b/services/cloudsync/docs/architecture.rst
@@ -0,0 +1,54 @@
+.. _cloudsync_architecture:
+
+============
+Architecture
+============
+
+CloudSync offers functionality similar to Firefox Sync for data sources. Third-party addons
+(sync adapters) consume local data, send and receive updates from the cloud, and merge remote data.
+
+
+Files
+=====
+
+CloudSync.jsm
+ Main module; Includes other modules and exposes them.
+
+CloudSyncAdapters.jsm
+ Provides an API for addons to register themselves. Will be used to
+ list available adapters and to notify adapters when sync operations
+ are requested manually by the user.
+
+CloudSyncBookmarks.jsm
+ Provides operations for interacting with bookmarks.
+
+CloudSyncBookmarksFolderCache.jsm
+ Implements a cache used to store folder hierarchy for filtering bookmark events.
+
+CloudSyncEventSource.jsm
+ Implements an event emitter. Used to provide addEventListener and removeEventListener
+ for tabs and bookmarks.
+
+CloudSyncLocal.jsm
+ Provides information about the local device, such as name and a unique id.
+
+CloudSyncPlacesWrapper.jsm
+ Wraps parts of the Places API in promises. Some methods are implemented to be asynchronous
+ where they are not in the places API.
+
+CloudSyncTabs.jsm
+ Provides operations for fetching local tabs and for populating the about:sync-tabs page.
+
+
+Data Sources
+============
+
+CloudSync provides data for tabs and bookmarks. For tabs, local open pages can be enumerated and
+remote tabs can be merged for displaying in about:sync-tabs. For bookmarks, updates are tracked
+for a named folder (given by each adapter) and handled by callbacks registered using addEventListener,
+and remote changes can be merged into the local database.
+
+Versioning
+==========
+
+The API carries an integer version number (clouySync.version). Data records are versioned separately and individually.