Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Hi Jens! From JS, I have created views by following way: var design = _design/db_name; db.put(design, { views : { getrecords_typewise: { map: function(doc) { if (doc.type doc.is_active) { emit([doc.type],doc) } }.toString() } } },

Re: couchbase phonegap w/o XMLHttpRequest

2014-03-18 Thread Seung Chan Lim
Ah.. Got it. Thank you! slim On Monday, March 17, 2014 9:01:40 PM UTC-4, J. Chris Anderson wrote: The example app codehttps://github.com/couchbaselabs/TodoLite-PhoneGap/blob/master/js/index.js uses a library I wrote https://github.com/jchris/coax that I tend to use from nodejs. I

Re: Error in CBLReplication CBLBeta3

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 5:21 AM, Endika Montejo endika.mont...@smoobility.com wrote: 2014-03-18 13:15:07.170 xxx[17682:b417] An instance 0x60114520 of class CBLReplication was deallocated while key value observers were still registered with it. Observation info was leaked, and may even

Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 3:27 AM, Ami Gandhi ami.ms...@gmail.com wrote: var design = _design/db_name; ... CBLView* view = [self.database viewNamed: @viewdoc/getrecords_typewise]; Those don't match. The second component of the design doc's name has to match the first component of the CBLView

Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Hi Jens! I have fixed this issue by using db_name/getrecords_typewise But when I install application, first time view is not working, it starts working from second time. Any idea why this happens? On Tue, Mar 18, 2014 at 8:30 PM, Jens Alfke j...@couchbase.com wrote: On Mar 18, 2014, at 3:27

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: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 8:04 AM, Ami Gandhi ami.ms...@gmail.com wrote: But when I install application, first time view is not working, it starts working from second time. What does not working mean, exactly? --Jens -- You received this message because you are subscribed to the Google Groups

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: autoSave question

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 8:19 AM, Todd Freese to...@filmworkers.com wrote: All of my CBLModels have autosave = YES. Do I need to worry about making sure the model object does not get deallocated until the autoSave runs? Or does autoSave keep a strong reference to the object until the autoSave

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 ?

Compression Errors

2014-03-18 Thread mike
Using CBL beta 3, SG beta 3 and Couchbase Server 2.2, CBL reports errors when 'compessResponses' is true in my SG config. Here's an example of the errors CBL is reporting: 11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id=(null)]: received corrupt gzip-encoded JSON part

Trouble linking CBLListener with Xamarin

2014-03-18 Thread Pier-Michael Lemay
Hi, Maybe you guys arent familiar with Xamarin but i'm out of ideas to make this work and i'm kinda new to linking(with xamarin). I have downloaded the latest beta 2 for couchebaselite framework, added both 64 bits framework to my project directory, downloaded the CouchbaseLite component on

Re: Compression Errors

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 9:19 AM, mike lam...@gmail.com wrote: 11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id=(null)]: received corrupt gzip-encoded JSON part Is this reproducible with the same document? If so, could you use ‘curl’ on the URL that it was GETting (as shown in the

Re: Trouble linking CBLListener with Xamarin

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 8:46 AM, Pier-Michael Lemay pm.lem...@gmail.com wrote: CouchbaseLite seems to work fine but when I'm trying to use the manager's InternalURL, I get Assertion failed: CBL_URLProtocol class not found; link CouchbaseLiteListener.framework. Hm, make sure you've added the

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: Compression Errors

2014-03-18 Thread mike
Sure thing. On Tuesday, 18 March 2014 11:35:54 UTC-5, Jens Alfke wrote: On Mar 18, 2014, at 9:19 AM, mike lam...@gmail.com javascript: wrote: 11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id=(null)]: received corrupt gzip-encoded JSON part Is this reproducible with the same

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: Sync troubles with beta3

2014-03-18 Thread Jens Alfke
I've filed this as issue #280. Let's continue the discussion there. --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

Re: Trouble linking CBLListener with Xamarin

2014-03-18 Thread Pier-Michael Lemay
Thank you for your reply Jens However, as I said before, I am kinda new to linking with Xamarin and i can't seem to get the correct mtouch argument to insert in my IOS Build option. I have tried : ObjC ObjC -gcc_flags -ObjC --gcc_flags=-ObjC I always end up crashing at my InternalURL line.

Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread J. Chris Anderson
On Tuesday, March 18, 2014 10:29:04 AM UTC-7, Ami Gandhi wrote: After installing app and when running it first time, views are not returning any data (no matter what I do add/edit/delete operations) but after restarting app View is retuning expected data. I am just not sure why it's not

P2P connection silly question

2014-03-18 Thread Sandra
Hello, I’m sorry to make this silly question but I’m implementing the listener in my IOS couch base program for a P2P connection, and I don’t know how to call this method from CBLListener: - (BOOL) start: (NSError**)outError; I’m calling it like this: BOOL ok = [_listener start:*error]; But

Re: P2P connection silly question

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 11:26 AM, Sandra txms...@gmail.com wrote: I'm calling it like this: BOOL ok = [_listener start:*error]; That * should be an . (This is the standard way errors are returned in Cocoa code; if you're not familiar with it you should read Apple's docs on error handling in

Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Thanks J. Chris! That was exactly happening with my case. When I added database creation line before native views (Below bold line) fixed my problem: NSError *error; CBLManager* dbmgr = [CBLManager sharedInstance]; //CBLRegisterJSViewCompiler(); self.liteURL =

Re: P2P connection silly question

2014-03-18 Thread Sandra
Thank you Jens, yes, I'm learning IOS and couch base, so it's been a challenge. BR, Sandra On Tuesday, March 18, 2014 12:32:27 PM UTC-6, Jens Alfke wrote: On Mar 18, 2014, at 11:26 AM, Sandra txm...@gmail.com javascript: wrote: I’m calling it like this: BOOL ok = [_listener

Re: CBLModel Property as an Interface Rather Than a Class

2014-03-18 Thread Scott Ahten
On Monday, March 17, 2014 8:40:18 PM UTC-4, Jens Alfke wrote: Hm, good point. You can look at the implementation in CBLModel to see what it’s doing; IIRC, the Class returned from itemClassForArrayProperty: is only used if the CBLModelFactory doesn’t know what class to use for that

Re: P2P connection silly question

2014-03-18 Thread Sandra
One more question, where do I get the netService.HostName and port? NSString *peerDB = [NSString stringWithFormat:@http://%@:%@@%@:%d/mydb/;, @naomi,@letmein,netService.hostName,netService.port]; I'm following this example:

FYI: Disabling WebSockets in pull replication (if you need to)

2014-03-18 Thread Jens Alfke
One of the new features in iOS beta 3 is the use of WebSockets for the changes feed that sends change notifications from the server to the pull replication. This is more efficient than the long-poll mechanism that we used to use. But it's a bunch of new code on both client and server, and there

Re: P2P connection silly question

2014-03-18 Thread Jens Alfke
On Mar 18, 2014, at 12:59 PM, Sandra txms...@gmail.com wrote: One more question, where do I get the netService.HostName and port? NSString *peerDB = [NSString stringWithFormat:@http://%@:%@@%@:%d/mydb/,@naomi,@letmein,netService.hostName,netService.port]; Here netService is the peer that

Re: P2P connection silly question

2014-03-18 Thread Sandra
Ok, let me study that. Thanks a lot! On Tuesday, March 18, 2014 3:34:57 PM UTC-6, Jens Alfke wrote: On Mar 18, 2014, at 12:59 PM, Sandra txm...@gmail.com javascript: wrote: One more question, where do I get the netService.HostName and port? NSString *peerDB = [NSString

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

passing commandline arg to phonegap app

2014-03-18 Thread Seung Chan Lim
Hello, I'm trying to pass: -Log YES -LogSync YES as command line arguments to: phonegap run ios --emulator Does anyone know how I can do such a thing? Thanks in advance, slim -- You received this message because you are subscribed to the Google Groups Couchbase Mobile group. To

Re: Couchbase Sqoop Data Locality question

2014-03-18 Thread Corey Nolet
Matt, Sure, your point is definitely valid for moving data from one completely separate distributed system to another. It is definitely not optimal in cases where I am using Couchbase as distributed cache on the same nodes as my Hadoop cluster. In fact, one of the main powers of Hadoop is its