DB Sync architecture
A DB Sync system includes a central server and several DB Sync client apps, each with its own local database.
The central server hosts the central database and a GAS running instances of the DB Sync server program to serve DB Sync client apps.
The DB Sync system requires a database schema describing the application SQL tables.
DB Sync client apps use the DB Sync client API module (dbsync_app
) to log
changes to the local database in the local change log and interact with the DB Sync service through
RESTful HTTP requests.

Server-side applications can directly connect to the central database; the applications can modify the data in the central database tables directly.
As a result, for all SQL tables shared between a DB Sync server-side app and any DB Sync client app, the server-side application must register its modifications in the DB Sync central change log. This allows the DB Sync system to detect modifications done by server-side apps and send these changes to the DB Sync client apps.
Server-side apps use the DB Sync server app API module (dbsync_srvapp
) to
register modifications in the central change log.