2
votes

I read about Couchbase used as a content distribution for offline-online content centric applications. But I can't figure out what's the algorithm that keeps everything in sync.

Does it just download whole documents when anything changes in it?

Or does the DB send just a delta? In that case, how is the delta computed and delivered?

Can the sync be configured to happen over compressed HTTP?

Also, I'm confused by the product naming: what product or combination of products do I need to use if I want an app that immediately shows updates to users as soon as I change documents in the server?

Cohchbase-lite? Couchbase-mobile? Couchbase sync gateway?

1

1 Answers

8
votes

1) Does it just download whole documents when anything changes in it?

Answer: Couchbase sends whole documents when content is changed. As a best practice, Couchbase recommends breaking your data into documents that update frequently, versus those that are more static to more efficiently perform sync operations.

2) Or does the DB send just a delta? In that case, how is the delta computed and delivered?

Answer: See above.

3) Can the sync be configured to happen over compressed HTTP?

Answer: Yes, Couchbase does optionally support gzip compression over the wire. See: https://github.com/couchbase/sync_gateway/issues/238

4) Also, I'm confused by the product naming: what product or combination of products do I need to use if I want an app that immediately shows updates to users as soon as I change documents in the server?

Cohchbase-lite? Couchbase-mobile? Couchbase sync gateway?

Answer: Couchbase Mobile = Couchbase Server (database server) + Couchbase Sync Gateway (sync application server) + Couchbase Lite (device embedded database).