Skip to content
Pure JavaScript implementation for Mozilla's Firefox Sync service
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
API
Makefile
PORTING
README
TESTS
TODO

README

mozsyncjs -- Mozilla Sync client in JavaScript
==============================================

This aims to be a complete client implementation for Mozillla's Sync
service.

Why JavaScript?
---------------

There are many platforms that allow writing applications using
JavaScript and to some extent, web technologies: Gecko, Chromium,
webOS, PhoneGap, Titanium, Gecko, etc. JavaScript has, to some extent,
become the Write Once, Run Everywhere language.

Structure
---------

This project has two distinct parts:

a) Generic JavaScript Sync service and engine implementations that can
   be used across platforms.  They implement the Sync API and encapsulate
   the syncing logic.

b) Integration code for various platforms.  This abstracts things like
   HTTP requests, persisting data, crypto, etc. into an API common
   across all platforms.

Goals
-----

* async APIs wherever possible (incl. module loading)

* use JavaScript the "good parts", EcmaScript 5 idioms wherever feasible

* 100% test coverage

* fully functional on the "web" platform (assumes nothing but a modern
  web browser)

* potential other platforms: chromium, gecko, webos, phonegap, etc.

Platform Integration
--------------------

A platform has to provide the following building block APIs necessary
for Sync:

Resource
  for making HTTP requests to REST resources. If XMLHttpRequest is
  available, the "web" platform's implementation can be used.

Crypto
  consisting of a random bytes generator, AES 256 CBC crypto, SHA1 and
  SHA256 hashing, as well as base32 and base64 encoding and decoding.
  The "web" platform provides pure JavaScript implementation of these,
  but many platforms have faster native implementations.

Settings
  for storing small amounts of data locally, e.g. last sync time.  If
  localStorage is eavailable, the "web" platofrm's implementation can
  be used.

Timer
  for launching functions asynchronously.

Building Clients
----------------

Notify
  TODO

Store (for each engine)
  TODO
Something went wrong with that request. Please try again.