Implementing couchbase offline sync in cordova project


#1

Hi,
I want to implement the offline sync feature in my hybrid app (cordova framework) & i explored about that but i didn’t get any proper documentation for that. Some question in my mind:

  1. I have installed the cordova couchbase-lite phonegap plugin, but what to do now.

  2. how to use sync gateway(configuring the ‘sync-gateway-config.json’ file).

  3. I have downloaded the couchbase server on my system, but how to connect it with my app.

So if any of the member of this group have any idea about how i implement this offline support to my hybrid app then please let me know about that.
You can also write mail to me on this address: paritosh.yadav.237@gmail.com


#2

http://developer.couchbase.com/documentation/mobile/1.2/get-started/get-started-mobile/phonegap/index.html


#3

Hi jens,
Thanks for the reply, but i already visited this link. This link will only help to clone the Todo app which i have already done, but i want to know how this app is connected to couchbase server(buckets and all) even looking at the “sync-gateway-config.json” file make my head rolling as how the syncing & connectivity is done. I have explored a lot about this but the only example is Todo app, from which i didn’t understand how’s the server configuration is done.

I wish you are getting what i want to communicate to you. Please help me out to resolve this issue.


#4

I’m not sure how to answer that. We have a lot of documentation already, including overviews of the different components. If you’re interested in training, Couchbase does offer mobile training classes.


#5

I just wanted to ask, is this possible to sync couchbaselite with our own database server(not with couchbase server)


#6

It will sync with CouchDB.


#7

The scenario is that right now my app is working perfectly along with my server, but now i need to have offline accessibility in it.that means i need the couchbase offline sync functionality with my server(not with couchbase server i.e. couchbaselite->syncgateway->myserver). So is it possible, or i have to use couchbase server/couchdb only.
Also, do i need to pay any fee/amount for this type of situation(for this functionality).


#8

No, Couchbase Lite requires a server that uses its sync protocol. That means Sync Gateway (which only works with Couchbase Server), CouchDB or Cloudant.

You can use Couchbase software for free. We charge for licenses only if you want support, training or consulting.


#9

ok then, is there any way by which i can sync my data from my running database to couchbase server because ultimately my data will be in my server only.

So is there any way to sync couchbase server & my own database server.
that is,(couchbase lite->syncgateway->couchbase server-> myserver)


#10

Perhaps you can consider your server as another “client” of Sync Gateway. The thought process behind it is that various devices connect to it and can sync with each other. That sounds to me like exactly what your goal is. You can listen on the _changes REST endpoint of Sync Gateway to get a feed of what has changed, and use that information to retrieve the data.

You can also set up an internal feed from Couchbase Server to your server if you wish, but you will get a lot of metadata along with it that won’t show up on the Couchbase Lite side (for housekeeping on the server).