diff --git a/SUMMARY.md b/SUMMARY.md index 2e28f8b..95b99eb 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -2,6 +2,7 @@ * [Data Synchronization](README.md) * [Sync Client](sync-client.md) +* [Sync Server Evaluation](sync-server-evaluation.md) * [ObjectBox Sync Server](objectbox-sync-server.md) * [Sync Server Configuration](sync-server-configuration.md) * [Data model evolution](data-model-evolution.md) diff --git a/sync-server-evaluation.md b/sync-server-evaluation.md new file mode 100644 index 0000000..7bd64e5 --- /dev/null +++ b/sync-server-evaluation.md @@ -0,0 +1,84 @@ +--- +description: An overview of the Sync Server mechanisms and capabilities. +--- + +# Sync Server Evaluation + +## Introduction + +_Capability of the sync server to handle data synchronization between devices._ + +The ObjectBox Sync Server is the main component that comes into play for the ObjectBox Sync feature. It is responsible for handling multiple connected clients and for making sure they all share the same state (i.e. equal database). + +Also the Sync Server, in addition to the clients, is provided with a **local database** which is kept up-to-date with the clients' updates. This is usually a _passive_ database, in the sense that it's meant to hold the state of the network and it's not directly modified by the user. Nevertheless nothing stops you from editing it as it was a sync client database (see the [Embedded Sync Server](advanced/embedded-sync-server.md) setup). + +When a Sync Client connects and logins, the Sync Server subscribes it for receiving new data updates. These are **push updates**, and thus are efficiently performed without involving any prior request by the client. Push updates are also [**pipelined**](#user-content-fn-1)[^1], which means they are sent in burst without waiting for single ACKs. + +_Determination as to how sync operates in various conflict scenarios._ + +The Sync Server activity ensures a consistent data history. A "last write wins" policy is employed to make sure the sync server holds a linear history. + +### **Fault tolerance** + +_How well does the client <-> sync server model work for various scenarios mimicking real world usage._ + +ObjectBox Sync Server, as well as other ObjectBox components, is internally tested with a large suite of unit- and integration-tests. This helps us putting it in several real world scenarios to check its resilience.\ +However, we don't exclude the possibility of not having covered specific use cases; and we kindly invite you to report any issue to the ObjectBox team. + +Common scenarios could be: + +* **A client goes offline**: It would still be able to commit changes to its local database. These changes are enqueued in the sync queue and will be eventually sent when the connection is (re-)established. The sync server is responsible for aligning the sync client's state with its state. +* **The Sync Server goes offline**: Synchronization wouldn't work anymore, every client would still write to its local database and enqueue changes to the sync queue. Once the sync server is back online, it will work to reach a commonly agreed state. To better tolerate this scenario you may be interested at [ObjectBox Sync Cluster](sync-cluster.md) solution. + +Moreover: + +* **Reliable transport layer**: Sync messages are carried over a TCP transport layer which guarantees a reliable communication. We also provide an additional reliability layer by using per-transaction ACK messages; to make sure the client correctly performed the operation. +* **Use of **_**heartbeat**_** packets**: Every client periodically sends an _heartbeat_ packet, in this way the sync server is readily able to notice when a client dies and act subsequently. + +## Performance + +_Speed and efficiency of data synchronization between devices via the sync server._ + +
Delta synchronization ✅ |
Push updates ✅ |
Custom binary protocol ✅ |
Pipelining ✅ |
WebSocket Secure (wss) ✅ |
Sync Client authentication ✅ |
Admin UI ✅ |
Debug logging ✅ |
ObjectBox support ✅ |