A Comparison of Offline Sync Protocols and Implementations

Sync Protocol or Implementation Conflict Resolution Strategies Client Implementations
CouchDB Replication Protocol
  • deterministically-chosen winner[1]
  • developer-supplied strategy (selecting from a revision tree of conflicts)[2]
Realm Sync Engine
  • last write wins (when updating or deleting objects)[4]
  • appending items (when inserting into a list)[5]
Firebase Realtime Database
  • last write wins (when using set() or update())[6]
  • appending items (when using push())[7]
  • developer-supplied strategy (when using transaction())[8]

1. Apache CouchDB implementations use a deterministic algorithm to choose a "winning" document. See: Working with conflicting documents. ↩

2. Apache CouchDB implementations will maintain a revision tree of conflicted documents, allowing for the selection of a "winning" document or the merging of document data using application logic. See: Working with conflicting documents. ↩

3. Couchbase Mobile 2.0 will not be compatible with the CouchDB Replication Protocol. ↩

4. See the Realm Objective Server documentation on conflict resolution. ↩

5. See the Realm Objective Server documentation on conflict resolution. ↩

6. See the Firebase documentation on saving data. ↩

7. See the Firebase documentation on saving data. ↩

8. Transactions in Firebase can be slow and complex as they require one or more round trips to the server. See the Firebase documentation on saving data. ↩