Sync_Gateway "Bucket Shadowing" implementation questions

190 views
Skip to first unread message

jalv...@txmglobal.com

unread,
Mar 6, 2014, 1:51:15 PM3/6/14
to mobile-c...@googlegroups.com
Hello,

We are developing an application with the following architecture:

Admin Web Portal --> CouchbaseServer
Mobile Device (using CouchBase Lite for iOS) --> Sync_Gateway --> CouchbaseServer

I've found that my mobile app only recognizes data sent directly through Sync_Gateway to the Couchbase Server,
but it doesn´t "see" any previous data inserted to the CouchbaseServer.

So I have two options to get all my data in sync:

1. Both (Web Portal and Mobile Devices) entering data via Sync_Gateway
2. Using method called "Bucket Shadowing" (preferred)

Right now I'm using a bucket named "Restaurant" on Couchbase Server, and my local Sync_Gateway connects to it.
According to the documentation I need to create a new "shadow" bucket on Couchbase Server and update my config.json to tell Sync_Gateway
to connect to existing bucket "Restaurant".

Then I have some questions:
 1. Will I end up having two buckets, the original "Restaurant" and a new one "Shadow_Restaurant" on my Couchbase Server, right?
 2. Will the Mobile device (via Sync_Gateway) read/write data from the new "Shadow_Restaurant" or from original "Restaurant" bucket?
 3. Will the Web Portal still writing to the original "Restaurant" bucket as it does today or it will write data to the new "Shadow_Restaurant" bucket?
 4. Using this approach, the Mobile device will be able to "see" the data from the original "Restaurant" bucket, right?

Kind Regards!
//Javier

Traun Leyden

unread,
Mar 11, 2014, 3:29:04 PM3/11/14
to mobile-c...@googlegroups.com

I think this may have slipped through the cracks.

Will do my best to answer, and Jens or Chris can add any corrections:


Then I have some questions:
 1. Will I end up having two buckets, the original "Restaurant" and a new one "Shadow_Restaurant" on my Couchbase Server, right?

Yeah.
 
 2. Will the Mobile device (via Sync_Gateway) read/write data from the new "Shadow_Restaurant" or from original "Restaurant" bucket?

The sync gateway would be reading/writing with Shadow_Restaurant.
 
 3. Will the Web Portal still writing to the original "Restaurant" bucket as it does today or it will write data to the new "Shadow_Restaurant" bucket?

The web portal would be writing to the original "Restaurant" bucket.
 
 4. Using this approach, the Mobile device will be able to "see" the data from the original "Restaurant" bucket, right?


Yes.  The sync gateway takes care of sync'ing changes between the original and shadow buckets.

 
Kind Regards!
//Javier

--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/3867ecd7-0bd6-4ffa-a9ce-d2549d290c31%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages