Re: Efficient Push/pull - Best Practices?

2014-03-19 Thread Traun Leyden
On Tue, Mar 18, 2014 at 11:04 AM, Jens Alfke j...@couchbase.com wrote: I know that the Couchbase Lite on Android doesn't yet have support for going on/offline, so you'll need to restart the replication as a workaround. (Or so I believe; Traun is the expert.) Good news! This was recently

Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
Hi all, I've just begun using couchbase lite through phonegap. I'm starting to use the http://couchbasecloud.com sync gateway server to see how I can propagate data from one device to another. Now I'm looking for some best practice tips. The PUSH seems easy enough, whenever I have new data I

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke
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

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
Wait... so there's something I'm missing When you say start a continuous push replication, do you mean simply make a single HTTP REST call to _replicate on my couchbase lite with source being the couchbasecloud.com sync gateway and target being my couchbase lite ? The rest is magic? Maybe

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
The only continuous feature I see is as a query parameter for the _changes REST call. Is something similar available for the _replicate REST call? slim On Tuesday, March 18, 2014 11:30:08 AM UTC-4, Seung Chan Lim wrote: Wait... so there's something I'm missing When you say start a

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 8:30 AM, Seung Chan Lim djs...@gmail.com wrote: When you say start a continuous push replication, do you mean simply make a single HTTP REST call to _replicate on my couchbase lite with source being the couchbasecloud.com sync gateway and target being my couchbase lite ?

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
So I just tried continuous:true and I get back a 200 status but the body is missing ok:true What does that mean? slim On Tuesday, March 18, 2014 12:18:22 PM UTC-4, Jens Alfke wrote: On Mar 18, 2014, at 8:30 AM, Seung Chan Lim djs...@gmail.comjavascript: wrote: When you say start a

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 9:38 AM, Seung Chan Lim djs...@gmail.com wrote: So I just tried continuous:true and I get back a 200 status but the body is missing ok:true What does that mean? A minor but harmless incompatibility with CouchDB, I suppose. --Jens -- You received this message because

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
I see. So both push and pull sync are started as continuous, but I'm not seeing any sync happening. I update the document on my couchbaselite db with new content using PUT I'm awaiting for it to magically make its way to couchbasecloud.com But I'm not seeing any changes happen when I see it

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
So I just ran the same code on my iPad mini and it worked. It didn't work when I was running it on my emulator. Is this odd or is it expected? slim On Tuesday, March 18, 2014 1:01:59 PM UTC-4, Seung Chan Lim wrote: I see. So both push and pull sync are started as continuous, but I'm not

Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 4:45 PM, Seung Chan Lim djs...@gmail.com wrote: When you say on/offline you mean if the network goes on/offline? I was referring to the application going foreground/background. Oh, OK. That's supported too. The replicator will stop when the app goes into the background