Embassy (using native model state to make model association + shutdown robust against change processing failures)Client side architecture
A library that implements the client side of our sync protocol, as well as the Google server-side infrastructure to serve Google Chrome users and synchronize data to their Google Account.
The goals for this protocol include:
The code lives in the Chromium repository, and is rooted at chrome/browser/sync.
Top level directory containing the entry point used by other chrome code, such as profile.h.
For example, profile_sync_service.h/cc
The rest of this stuff will live in 'browser_sync' namespace.
Stuff needed to embed the engine into Chrome.
The core sync engine parts and "business" logic, because it's business time.
The domain of all things syncable on the client. The definitions of what a bookmark or a folder look like in sync-land, as well as the code responsible for maintaining the local cache of the cloud state, are found in here. The code to persist the local cache using sqlite is also found here.
Contains our protobuf specification of the messages sent between clients (the browser) and sync servers.
To make this sync infrastructure scale to millions of users, we decided to leverage existing XMPP-based Google Talk servers to give us "push" semantics, rather than only depending on periodically polling for updates. This means when a change occurs on one Google Chrome client, a part of the infrastructure effectively sends a tiny XMPP message, like a chat message, to other actively connected clients telling them to sync. To put that gain into perspective, consider a 3 minute polling interval. 3 minutes is far from real time, or "immediately" as our goal was stated. But already, at the very least, every 3 minutes every client needs to ask the server if anything changed. Even with just one thousand users, we're already talking about a server having to handle a poll request every 0.18 seconds on average (or roughly 5.6 queries per second). And that's just when nothing is happening! Using XMPP pushes, the sync servers don't need to waste cycles for no reason.