On Mar 6, 2014, at 10:45 AM, [email protected] wrote:

> 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.

Yup. This is a documented limitation. It's possible to tell the gateway to 
import existing docs in the bucket when it starts up, but it's not a very good 
solution because it still can't detect later changes made to those docs.

> 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".

Not quite. You tell sync gateway to use the new "Shadow_Restaurant" bucket, and 
to make it a shadow of the original "Restaurant" bucket that contains your 
Couchbase Server docs.

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

Yes.

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

"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?

It should write to the same bucket it does today, i.e. "Restaurant".

>  4. Using this approach, the Mobile device will be able to "see" the data 
> from the original "Restaurant" bucket, right?

Yes. It's a kind of special-purpose sync between the two buckets. Changes made 
to either one get propagated to the other.

--Jens

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/C57356F8-E871-4EC1-BBD6-C8130AB670D5%40couchbase.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to