Couchbase Sync Gateway - server and client API against bucket shadowing

I am working on a project that uses Couchbase Server and Sync Gateway to synchronize bucket contents with iOS and Android clients working with Couchbase Lite. I also need read and write access to the Couchbase Server from the Node.js server application. From the research I did, using shadowing was frowned upon ( https://github.com/couchbase/sync_gateway/wiki/Bucket-Shadowing ), which made me look into the synchronization gateway API, which means updating the bucket from the Node.js. application. Updating existing documents via the Sync Gateway API requires the latest identifier of the version of the document, which must be transmitted, requiring separate reading before modification ( http://mobile-couchbase.narkive.com/HT2kvBP0/cblite-sync-gateway-couchbase-server), which seems to be potentially ineffective. What is the best way to solve this problem?

+4
source share
2 answers

To update a document (which is actually creating a new version), a revision identifier is required. Otherwise, Couchbase cannot associate the update with the parent. This violates the whole conflict resolution approach. (Couchbase uses a method known as multiversion concurrency.)

You are expected to update existing document content. This means that you have already read the document, including the revision identifier.

- , . (, Sync Gateway, ), , .

, - , ( ).

+1

, , . , Couchbase, Sync Gateway, , , "", . Couchbase Lite, , Java,.NET Mac OS X. -, , Couchbase Lite? .

0

All Articles