When you build an application for a server centric Pervasive Computing system, you typically would have a server piece and a client piece of the application (Fig. 4). The server application runs on the central server interacting with the data stored in the server application schema. The client application runs on the devices interacting with the data stored in the client application schema.
Figure 4 Pervasync Database Synchronization System Architecture
Your applications can rely on the Pervasync Database Synchronization System (shaded parts of Fig. 4) to make the client app schema and the server app schema in-sync. On the server side, the server application interacts with the sync server via the sync server admin API to define the sync behavior, e.g. data subsetting. On the client side, the client application interacts with the sync client. Each sync client has a sync agent API and a sync client admin API.
The Pervasync synchronization infrastructure has a server piece and a client piece. The sync server connects with the server admin schemas, which contain the sync server metadata. Multiple server DBs can be supported for scaling out. There is one server admin schema on each server DB. The sync server itself also can have multiple instances to meet scalability requirements.
The sync client connects with a client admin schema, which contains sync client metadata. Client application can initiate synchronization by invoking the sync agent. The sync client admin API can be used by client application to manage the sync client metadata.
Sync clients communicate with sync server via HTTP. Logical transactions from the client DB are wrapped in the HTTP requests and sent to server to be checked-in to server DB by the sync servlet. Check-in is the first half of the sync session. The second half of the sync session is Refresh, in which the logical transaction from server is wrapped in the HTTP response and sent to client.
In addition to the sync servlet component, which interacts directly with sync clients, the sync server also has a sync engine. Sync engine is a background process that updates data subset state tables by processing table logs so that sync servlet can quickly figure out server side changes for a client.