Re: TodoLite-PhoneGap demo app not working
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() } } }, function(){ cb(false, db([design, _view])) }); And it's working in my iOS application. But if I create view from iOS native but it's not working. Although I created views in native android which is working great. Here is iOS code: CBLManager *manager = [CBLManager sharedInstance]; NSError *error; self.database = [manager databaseNamed: @db_name error: error]; CBLView* view = [self.database viewNamed: @viewdoc/getrecords_typewise]; //I also tried this: CBLView* view = [self.database viewNamed: @getrecords_typewise]; [view setMapBlock: MAPBLOCK({ id type = [doc objectForKey: @type]; if (type) emit(type, doc); }) version: @1.0]; Please let me know how to create native iOS view, I want to call it from JS. (same way which I did for Android). Thanks On Tue, Mar 18, 2014 at 6:06 AM, Jens Alfke j...@couchbase.com wrote: On Mar 17, 2014, at 2:29 PM, Ami Gandhi ami.ms...@gmail.com wrote: CBLView* view = [self.database viewNamed: @getrecords_typewise]; I'm pretty sure you have to name your views in the form designdocname/viewname to make them compatible with the REST API (since that's how views are specified in CouchDB.) I don't know anything about the JS API you're using to query the view, but it probably expects the view name in the same format. --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/A9E41ECA-89EF-4636-9008-493B9702C819%40couchbase.com . For more options, visit https://groups.google.com/d/optout. -- 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/CALA2sAZH-9rDnDOh4_Pnw5NB9D81bK%3DKNoaB9%2B8qcr_q018OsQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: couchbase phonegap w/o XMLHttpRequest
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 should probably just swap it out for jQuery or Zepto as it doesn't bring much beyond what they offer. If I was writing it today I'd probably start here: http://zeptojs.com/#$.ajax One call in the example app you can't forget is the one that gets you the URL of the local Couchbase Lite instance. cblite.getURL(function(err, localURL) { var dbURL = localURL + mydatabase; $.ajax({url : dbURL, type : POST, dataType : json, data : {test : document}, success : function(resp){alert(resp)}}) }) On Monday, March 17, 2014 2:25:41 PM UTC-7, Seung Chan Lim wrote: Hi I'm new to developing phonegap applications and couchbase lite. I've managed to get a simple app written and running on an iPad using both tech, but I feel as if I'm missing something. Currently I'm interfacing couchbase lite functionalities by using an XMLHttpRequest object. But the sample code uses no XML HTTP Request. What is going on? How can I get documentation on how to use couchbase lite without XML HTTP Request object? In the sample code I notice that it uses global variables like config. Where can I find documentation on these? thank you slim -- 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/41b476b0-2f94-4438-b778-2eb7ba8914fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Error in CBLReplication CBLBeta3
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 become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info: This is an error from Foundation's key-value observing telling you that one of your objects registered as an observer of a CBLReplication object but forgot to remove itself before that CBLReplication was dealloced. NSKeyValueObservance 0x600cdd60: Observer: 0x6080002839d0, Key path: completedChangesCount, Options: New: NO, Old: NO, Prior: NO Context: 0x0, Property: 0x6005aac0 NSKeyValueObservance 0x600cd660: Observer: 0x6080002839d0, Key path: error, Options: New: NO, Old: NO, Prior: NO Context: 0x0, Property: 0x602503b0 Those Observer: values show the addresses of your objects that are registered, which you can then inspect in the debugger. --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/F9B7380C-C7B9-4EE4-A8BE-9E41D6687EFA%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: TodoLite-PhoneGap demo app not working
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 name. --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/5AE063FC-25EA-480B-A325-A706803299F8%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: TodoLite-PhoneGap demo app not working
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 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 name. --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/5AE063FC-25EA-480B-A325-A706803299F8%40couchbase.comhttps://groups.google.com/d/msgid/mobile-couchbase/5AE063FC-25EA-480B-A325-A706803299F8%40couchbase.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CALA2sAZ7ohNWSL96NZxrM7ooqj1XNEAD-17QNx7ADZ%3D_vuGB0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Efficient Push/pull - Best Practices?
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 push by making a REST call to _replicate on my couchbase lite. Are there best practice tips here? 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? What's the best way to implement such notification mechanism? Is it to connect directly to the sync gateway on its _changes feed and call _replicate on my couchbase lite when I get something from the feed? (BTW, what's the difference between normal and long poll?) thank you slim -- 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/04d9ff24-f32a-4a54-869b-bd24672fe65f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: TodoLite-PhoneGap demo app not working
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 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/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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.
Re: autoSave question
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 completes? I'm using ARC. Don’t worry about it. The database keeps a collection of unsaved models to ensure that they don’t get deallocated till the save happens. (This applies with or without autosave, btw.) —Jens smime.p7s Description: S/MIME cryptographic signature
Re: Efficient Push/pull - Best Practices?
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 I don't understand what you mean by continous push replication. Can you help me better understand? slim On Tuesday, March 18, 2014 11:25:41 AM UTC-4, Jens Alfke wrote: On Mar 18, 2014, at 8:05 AM, Seung Chan Lim djs...@gmail.comjavascript: 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/f5a9915d-de24-443d-8f8d-bbb4533e6d6e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 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 I don't understand what you mean by continous push replication. Can you help me better understand? slim On Tuesday, March 18, 2014 11:25:41 AM UTC-4, Jens Alfke wrote: 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/c673054f-6c18-46ae-9dc1-a04a4e3e5c0d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 ? The rest is magic? Maybe I don't understand what you mean by continous push replication. Can you help me better understand? The Concepts Guide explains continuous replication. Looks like our REST doc for _replicate is missing the 'continuous' property. Try the CouchDB docs instead. (Overview here.) --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/33DCFC91-02C7-4E06-A7A6-E8233E521D02%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Compression Errors
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 11:09:12.323‖CBLMultipartDownloader[/learning/4609AA39-D4EF-4ECC-96B3-015283ED183B]: Got error Error Domain=CBLHTTP Code=502 502 Invalid response from remote replication server UserInfo=0x11001d2a0 {NSURL=https://couchdemo.infinitecampus.com/learning/4609AA39-D4EF-4ECC-96B3-015283ED183B?rev=50-54037c0b0359fd8bf6cdb66ebdb288b0revs=trueattachments=true, NSLocalizedFailureReason=Invalid response from remote replication server, NSLocalizedDescription=502 Invalid response from remote replication server} SG doesn't report an error: 11:09:11.011180 HTTP: #970: GET /learning/4609AA39-D4EF-4ECC-96B3-015283ED183B?rev=50-54037c0b0359fd8bf6cdb66ebdb288b0revs=trueattachments=true (as redacted) As long as I set 'compressResponses' false in the SG config file, everything works as expected. Could this be a result of using Couchbase Server 2.2? -- 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/b383f73c-81b3-4f86-b286-4502642298fb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Trouble linking CBLListener with Xamarin
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 the Xamarin store and added the Couchbase.dll from that component to my References. 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. Is there any CouchbaseLiteListener.dll or something else i could be missing to link the listener to my Xamarin project. Thank you -- 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/b265f59b-0086-4527-8a48-e145222ca253%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Compression Errors
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 gateway log, or in the CBL logs with ‘RemoteRequest’ logging) and save that to a file and send it to me? —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/4D212FBC-302D-4F74-97FE-8295FE21D74B%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: Trouble linking CBLListener with Xamarin
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 -ObjC linker flag, otherwise that class may be dead-stripped. If that doesn't help, look for any linker warnings produced when building your app. They might contain clues. --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/379B03AE-90B5-4EEC-AF37-8761F7B4FF08%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 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 I don't understand what you mean by continous push replication. Can you help me better understand? The Concepts Guidehttp://docs.couchbase.com/couchbase-lite/cbl-concepts/#replication explains continuous replication. Looks like our REST doc for _replicatehttp://docs.couchbase.com/couchbase-lite/cbl-api/#post-replicate is missing the ‘continuous’ property. Try the CouchDB docshttp://docs.couchdb.org/en/latest/api/server/common.html#replicate instead. (Overview herehttp://docs.couchdb.org/en/latest/intro/api.html#replication .) —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/2509cf18-4945-48f6-b95f-21e18b3cceb2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 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/DC0CE75D-D1B1-4E8E-995E-0E401CBAB513%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: Compression Errors
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 document? If so, could you use ‘curl’ on the URL that it was GETting (as shown in the gateway log, or in the CBL logs with ‘RemoteRequest’ logging) and save that to a file and send it to me? —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/23dde2ef-6b9f-46da-a259-f97ab6c3e878%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 directly on couchbasecloud.com http://sync.couchbasecloud.com/guestconvo/2474AB4342BC425EB95D7C7679BA6C5E My couchbaselite is on rev 224 and the copy on couchbasecloud.com is on 221 Am I missing something else? Thanks again for all your help, slim On Tuesday, March 18, 2014 12:46:42 PM UTC-4, Jens Alfke wrote: On Mar 18, 2014, at 9:38 AM, Seung Chan Lim djs...@gmail.comjavascript: 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 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/7ee78702-a4de-4de9-aacd-c7c8a3309e23%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 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 directly on couchbasecloud.com http://sync.couchbasecloud.com/guestconvo/2474AB4342BC425EB95D7C7679BA6C5E My couchbaselite is on rev 224 and the copy on couchbasecloud.com is on 221 Am I missing something else? Thanks again for all your help, slim On Tuesday, March 18, 2014 12:46:42 PM UTC-4, Jens Alfke wrote: 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 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/7c9a1383-3091-48e1-8a70-fc135190ef56%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Sync troubles with beta3
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 mobile-couchbase+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/ABDF3255-EC29-43B9-856A-C06D62ADF49C%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: Trouble linking CBLListener with Xamarin
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. Can you give me the exact argument to insert into the Additional mtouch arguments section. Thank you -- 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/0f84fe18-758c-4b19-a255-dc64e2f3bf2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: TodoLite-PhoneGap demo app not working
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 returning expected result. Maybe the database create operation isn't getting called until after the view definitions? So that when the view definitions run on second launch, they succeed. Are there any errors coming from the view definition code? On Tue, Mar 18, 2014 at 8:53 PM, Jens Alfke je...@couchbase.comjavascript: wrote: On Mar 18, 2014, at 8:04 AM, Ami Gandhi ami@gmail.com javascript: 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 Couchbase Mobile group. To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.comhttps://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/5b61f679-56ac-410e-94cf-4d020081e81a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
P2P connection silly question
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 I’m getting this error: sending NSError to parameter of incompatible tyle NSError *_autoreleasing * Any idea is very appreciated, Sandra -- 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/98939076-4d25-4a52-bdfe-3d6dd393f9fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: P2P connection silly question
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 Cocoa.) --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/6EF2483C-07F0-4336-9953-9D7634F40653%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: TodoLite-PhoneGap demo app not working
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 = dbmgr.internalURL; // create a database *self.database = [dbmgr createDatabaseNamed: @poc error: error]; * //Native views On Tue, Mar 18, 2014 at 11:54 PM, J. Chris Anderson jch...@couchbase.comwrote: 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 returning expected result. Maybe the database create operation isn't getting called until after the view definitions? So that when the view definitions run on second launch, they succeed. Are there any errors coming from the view definition code? On Tue, Mar 18, 2014 at 8:53 PM, Jens Alfke je...@couchbase.com wrote: On Mar 18, 2014, at 8:04 AM, Ami Gandhi ami@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 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/48102C50-4A2B-45C5-850D- 5B7023D67676%40couchbase.comhttps://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/5b61f679-56ac-410e-94cf-4d020081e81a%40googlegroups.comhttps://groups.google.com/d/msgid/mobile-couchbase/5b61f679-56ac-410e-94cf-4d020081e81a%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CALA2sAb88DNE_88f-nTmYaF%3Dv9s2Aaz7BWyuj-BXA3ZQmLie8Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: P2P connection silly question
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 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 Cocoa.) —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/92272f65-78bc-4e6d-9e5b-f454de459cb5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CBLModel Property as an Interface Rather Than a Class
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 particular document. So as long as you’ve registered the document ‘type’ property (or whatever) with the factory, it should be OK. —Jens Thanks Jens. I'll take a look at the implementation. -- 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/613d28fa-d3f4-4890-a85c-5652c8061b2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: P2P connection silly question
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: https://groups.google.com/forum/#!searchin/mobile-couchbase/p2p/mobile-couchbase/oFGn1zybDcE/7BE3vFXh9xoJ Thank you, Sandra On Tuesday, March 18, 2014 1:18:34 PM UTC-6, Sandra wrote: 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 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 Cocoa.) —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/3c14dc6b-181b-45d4-883e-0e70b4c921c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
FYI: Disabling WebSockets in pull replication (if you need to)
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 may be bugs in it. If you're upgrading to beta 3 and finding new problems with pull replications, you can try disabling WebSockets and see if that helps. To do so, just add a line like this after creating your pull replication: pullRepl.customProperties = @{@websocket: @NO}; If this makes the problem go away, please file a bug report. Actually file a bug report even if it doesn't help, but note that you tried this. (Please don't pre-emptively disable WebSockets if you're not seeing problems! The new code needs testing, and it will be worth it to have it solid in 1.0. It's faster, uses less bandwidth, and puts less load on the server.) --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/6BDA3CB5-BD4B-43BB-BF25-6554D94D57E6%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
Re: P2P connection silly question
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 your NSNetServiceBrowser discovered. The code you quoted is probably intended to be called from the browser delegate method - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing; If you're not familiar with Bonjour and NSNetService, you should look at Apple's sample code like PictureSharing. It'd definitely be best to experiment with it and understand how it works, before trying to integrate it with Couchbase Lite. —Jens smime.p7s Description: S/MIME cryptographic signature
Re: P2P connection silly question
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 stringWithFormat:@http://%@:%@@%@:%d/mydb/,@naomi,@letmein,netService.hostName,netService.port]; Here netService is the peer that your NSNetServiceBrowser discovered. The code you quoted is probably intended to be called from the browser delegate method - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing; If you're not familiar with Bonjour and NSNetService, you should look at Apple's sample code like PictureSharing. It'd definitely be best to experiment with it and understand how it works, before trying to integrate it with Couchbase Lite. —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/95ac2fe0-70b9-4860-b2e2-940b991a6fe7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Efficient Push/pull - Best Practices?
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 and resume when it returns to the foreground. Not sure why this wouldn't be working for you. Does PhoneGap allow you to add command-line args when launching your app? If so, add args -Log YES -LogSync YES. Then you'll get logging about what's going on during sync. You should see messages about Reachability state, including suspended=1 on background and suspended=0 when foregrounded. --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/9FEACA03-BC2A-49DA-9D0F-41D5ADB28A03%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
passing commandline arg to phonegap app
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 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/7cc4605e-b36d-4f5f-8a08-b79666891970%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Couchbase Sqoop Data Locality question
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 ability to maintain knowledge of locality and pass that info down to the map/reduce layer so that mappers can be scheduled on nodes closest to the data. Network is worlds slower than memory- if I can have a mapper on each node just pulling data from it's local Couchbase tap instead of hitting the network at all, then I'm in a much better position. I'd also say the same for Couchbase proper- if I could hash the data my way so that I can control on which node it ends up, i'd be in a better position with my use of the distributed cache. I want to do streams processing but give my users the abilty to query the cache using elasticsearch. From what I've looked at in the Couchbase Java Client, I can fill in an interface to determine which VBucket a key should end up in but I'd have to recompile the client in order to use my specialized hashing function. I don't mind doing this, but again I have no way to find out which node will host that vbucket. Your hashing solution works when I want to guarantee always an even distribution, but I don't always want to guarantee that (or maybe I know better about what a more useful even distribution may look like based on my domain's use-cases than Couchbase does based on its auto-sharding). In my environment, I'm using Couchbase as a mutability layer on top of Hadoop because my data can change quite frequently for a period of time until it's considered immutable and I can vet the data into Accumulo via map/reduce job. For this use case, the Sqoop plugin just adds an extra step of having to write a file in HDFS and then map/reduce over the file- to put the data somewhere else. It also adds storage overhead. I ripped out the CouchbaseInputFormat from the Sqoop plugin github project. I don't know why the version of the Sqoop plugin that works with CDH3 uses Membase client to perform the TAP but for some reason I could not get that to work in Couchbase 2.x. I changed that to use CouchbaseClient instead of Membase and it works fine. I've now got an InputFormat that's correctly pushing the data directly to Accumulo but it's based entirely on the network. It would definitely benefit from having locality and not wasting precious network bandwidth. I'm not an Erlang developer so I don't think pointing me directly to an Erlang method would be useful to me- though I know in my past experience with Couchbase that some of the methods have been exposed via a remote eval function (or maybe Erlang does this automatically?). Is it possible to use that eval to ask Couchbase on which nodes a vbucket is being hosted? It's a function that I'd need to call once during the initialization of the inputformat. Thanks again Matt! On Thursday, March 13, 2014 1:38:39 PM UTC-4, Matt Ingenthron wrote: Hi Corey, From: Corey Nolet cjn...@gmail.com javascript: Reply-To: couc...@googlegroups.com javascript: couc...@googlegroups.com javascript: Date: Wednesday, March 12, 2014 8:57 PM To: couc...@googlegroups.com javascript: couc...@googlegroups.comjavascript: Subject: Couchbase Sqoop Data Locality question Hello, I'm looking through the source code on github for the couchbase hadoop connector. If I'm understanding correctly, the code that generates the splits takes all the possible VBuckets and breaks them up into groups based on the expected number of mappers set by Sqoop. This means that no matter what, even if a mapper is scheduled on a couchbase node, the reads from the dump are ALWAYS going to be sent over the network instead of possibly pulled from the local node's memory and just funneled into the mapper sitting on that local node. This is true, however… Hadoop is designed to run across a cluster of systems distributed on a network. Couchbase, similarly is designed to be run distributed across systems. So while you're describing a possible optimization, it's not something that's part of either one right now. Actually, the way sqoop runs is ideal for most deployments since it gives us great throughput by splitting/distributing the job. Looking further into the code in the java couchbase client, I'm seeing a class called VBucketNodeLocator which has a method getServerByIndex(int k). If I understand this method, it's allowing me to look up the server that holds the vbucket number k. Is this correct? If it is correct, would it make sense for this to be used in the getSplits() method in the CouchbaseInputFormat so that the splits for the vbuckets can be grouped by the server in which they live? I agree that it may not make sense for many who have their couchbase cluster separate from