Skip to content

Instantly share code, notes, and snippets.

@pgte
Last active August 29, 2015 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgte/2183424d570b4fb5bedc to your computer and use it in GitHub Desktop.
Save pgte/2183424d570b4fb5bedc to your computer and use it in GitHub Desktop.
personalized sync

Personalized Sync

The goal is for each client to have a local personalized copy of the database. This personal local database is a subset of all the existing documents. Clients can share documents or not.

Authenticated session and filters

Each client intiates an authenticated session with the server. On each session, server sets up personalized read and write filters. These filters only propagate changes that the user is allowed / interested in.

Changes feed

There is a central CouchDB database server, containing allthe documents for every user. Node.js server listens for _changes on all databases. Each change is forwarded to client filters.

Diagram

Architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment