Thanks Jens.   It was very useful.

As we are exploring more on this framework we are coming up with new 
complex scenarios that we need to address.  I am putting down those and 
request to provide guidance on 
how CouchBase Lite Mobile will handle these scenarios:

- We need to do concurrent write and read. We want to have the native 
objective c code do a write using the APIs provided into the CouchBase Lite 
Objective C APIs.  Concurrently we want to read via JS/REST APIs via 
Cordova Plugin.
So basically we want to do sync in native and read via JS/REST APIs from 
with in the WebView concurrently.  However while the native code is doing 
write ; we were not able to read via the REST API/JS via Cordova plugin.
  Is this type of complex scenario supported ?

-  How to do concurrent read and write with in WebView via REST APIs/JS ?  
Is it supported ? So basically if the concurrent native sync and read via 
web view does not work than we would want to have concurrent read and write 
using JS only ?  


- What all needs to be done if we would want to have Cordova plugin use 
CoreData in place of SQLLite ?


- Can we use pure JQuery Ajax calls to perform all REST APIs operations via 
Cordova Plugin ?







On Thursday, May 21, 2015 at 9:22:21 PM UTC+5:30, Jens Alfke wrote:

>
> On May 21, 2015, at 1:56 AM, [email protected] <javascript:> wrote:
>
> - So the CouchbaseLiteListener  internally creates a HTTP server on the 
> device itself and all the REST API calls are submitted to this local HTTP 
> server on the device itself.
> The actual magic of inserting/updating data happens inside the 
> CouchbaseLiteListener  .  
>
>
> It’s not really going through an HTTP server. The listener just sets up an 
> NSURLProtocol that instructs WebKit / CFNetwork to route all HTTP requests 
> for the host “lite.couchbase.” to its own handlers instead of sending them 
> over the network. This is a lot more lightweight (and secure) than going 
> through a socket.
>
> - Why CouchBaseLite chose this round about way of invoking the plugin ?  
> Wouldn't it have been easier if they would have provided a one to one 
> mapping of the JS APIs in the pluging itself.
>
>
> Couchbase Lite does not have a JavaScript API. In addition to its native 
> API (Objective-C or Java or C#) there is a REST API, as defined by CouchDB 
> <http://docs.couchdb.org/en/latest/api/index.html>  There are a number of 
> JS convenience wrappers people have created around this, with different 
> APIs, and you’re free to choose whichever one you want.
>
> There happens to be a different CouchDB compatible database, PouchDB, 
> that’s implemented directly in JS and has its own direct JS API. Maybe in 
> the future we’ll implement a similar API that directly calls into Couchbase 
> Lite, but that’s not something we’ve decided to do yet.
>
> —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/9904342b-34f2-4586-adf2-4ea9026fa93f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to