On Mar 18, 2014, at 8:05 AM, Seung Chan Lim <djs...@gmail.com> wrote:

> The PUSH seems easy enough, whenever I have new data I push by making a REST 
> call to _replicate on my couchbase lite.

Don't do that. You should start a continuous push replication when the app 
starts up. The replication will then take care of watching for database changes 
and pushing them. (And it will intelligently do this when the device is online, 
and stop when offline.)

> As for the PULL, the simplest thing I can do is just have a window.setTimeout 
> that calls _replicate on my couchbase lite (with the source and target 
> reversed from PUSH), but I'd like to _only_ PULL from the sync gateway the 
> moment it notifies it has something for me?

Again, you should simply start a continuous pull replication when the app 
starts, and it will take care of watching for changes remotely and pulling them.

--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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/22A41AF8-8FFB-4647-A3F4-676C319F8361%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to