The collection provides a custom sync function that routes changes to the
conventional CRUD endpoints of the Rails application. For example, when you
invoke collection.create({...}, {wait:true}), it makes a POST request to the
Rails app.

When updates are pushed from the Rails server to the client, the collection is
updated and add, remove, or change events are fired. For example, a view
may react to an add event as follows:

Local HTML5 Storage

Objects in the collection are cached in the local HTML5 storage. If the client
is online, this helps to reduce the initial time required to load the
interface; if the client is offline, this allows the collection to be
re-created from the cache, showing the user a decent (but outdated) interface.

Separate App Server and Push Server

For scaling purposes, the app server can be separated from the push server.
This also allows multiple app servers to share the same push server. When these
servers are started, a shared secret must be provided. This secret will be used
to sign messages sent from the app servers to the push server.