How it will work Synchronization gate way when couchbase lite and couch base server

1.How the Sync Gateway syncs the data between Couchbase Server and Couchbase lite? Please explain the step by step process how it happens. If possible, please provide sample code.

2.How to sync data using Sync Gateway; only the Latest data that is updated either in the server or in the client when the client changes its state from offline to online? Please provide sample code.

@mchallari

I’d recommend starting with the mobile documentation

This includes a tutorial for creating a ToDo List application with Couchbase Mobile

Dear Andy,
Thanks for your’s reply.But I can’t get the solution want to need, The Sync Gateway syncs the data between Couchbase Server and Couchbase lite? need to steps of process and example of synch gate way code. It’s mean how it will work sync gateway between both.Please give me explanation.

@mchallari … Here is the documentation on the replication Algorithm. https://github.com/couchbase/couchbase-lite-ios/wiki/Replication-Algorithm

Here is Diagram ladder for PUSH (CBL to SG).
PULL is almost the same thing except NO Step 4 & 5. Step 6 is a _bulk_get instead of bulk_insert.

Hi househippo,
I can’t under standing to “ToDo List application with Couchbase Mobile” how to config, run and install I got errors in installing synch gate way, I am walking through the sync gate way data between couch base lite into couch base server.

  1. sync gate way is worked on both couch base server and couch base lite or which side sync gate way working mostly. I saw more time on couch base mobile and couch base synch

I am new to use Couchbase lite . I want to have two way data sync between mobile app and couch bas server. What is the best sample code that sync between mobile app and couchbase server ? Where it is located to download and see? I saw an example “ToDo List application with Couchbase Mobile”, but I don’t understand what this sample project doing. it does’t look like for two way data sync. Is there any sample Couchbase sample project to show two way data sync between server and client?Please explain the step by step process how it happens. If possible, please provide sample code.

Hello
I want to need complete couchbase tutorial i.e couchbase server,couchase lite, sync gate way and N1Ql queries covered in this any tutors are available in this way. Please give me suggestion which tutors covered in all topics in online classes.

@mchallari … checkout this sample mobile and web app here https://github.com/couchbaselabs/mobile-travel-sample

It even has a Youtube video going over the architecture.

Hi househippo
I am run the sample project but did get the errors and am just installed sync gateway that’s, If that i run[/opt/couchbase-sync-gateway/bi
n/sync_gateway sync-gateway-config.json
](http://) i share the screenshort

what get the errors, iam not run another sync.

@mchallari,

Looks like you have another sync_gateway instances already running.

If its running on your local machine just run

–to see if its running
#ps -ef | grep sync

–to kill all running instances of SG
#pkill -f sync_gateway

Hello househippo
Thanks for your reply. your send to commands are running in my terminal.But get the same errors

FATAL: Failed to start HTTP server on 127.0.0.1:4985: listen to
p 127.0.0.1:4985: bind: Address already in use – rest.(*ServerConfig).Serve() at config.go:7
05

@mchallari

Looks like Sync gateway is still running. Do you see the Sync gateway process running with the #ps -ef | grep sync_gateway?

If you are on mac OS, can you run this command to see what process is on 4985

lsof -i tcp:4985

Hello Mam,
thanks for your reply. I would like to run command but its same errors are got. What’s problem iam not identified that.

I want to need Revision Id history.suppose handle revision Id during sync processing in couchbase.Please give me understandable examples.

FATAL: Failed to start HTTP server on :4984: listen tcp :4984:
bind: address already in use – rest.(*ServerConfig).Serve() at config.go:705

I am new to use Couchbase lite .Iam developing a project in ionic I want to have two way data sync between mobile app and couch bas server using IOnic. What is the best sample code that sync between mobile app and couchbase server ? Where it is located to download and see? I saw an example “ToDo List application with Couchbase Mobile”, but I don’t understand what this sample project doing. I want to need Is there any sample Ionic sample project to show two way data sync between server and client?Please explain the step by step process how it happens. If possible, please provide IOnic sample code.

Did you get error when you ran the command? What is the output when you run the command. This command lists what processes are attached to 4985. if there is a process attached, we will have to kill it first

Links to sample apps were provided in previous responses- ToDo app and the Travel Sample app. Without being able to run the sync gateway, you won’t get very far with testing sync with any sample app (ionic or otherwise). So I would recommend that we first try to figure out why the sync gateway won’t start at the specified port (see my previous post).

The only ( unofficial) sample app for ionic is GitHub - couchbaselabs/TodoLite-Ionic: To-Do list sample app for Couchbase Lite, using Ionic and the PhoneGap plugin. But it’s not actively maintained so I can’t guarantee it would work. But it will be a good starting point. Also, the sample app is not for couchbase lite 2.0 .

Hello,
Good job. I want to need some help. Actually, I have to develop an angular4 application but I am new in angular (I am writing some functionality in angular 4 ex:loans,user … json and also read the files in using node js , express js to connect to couch base ,but i want to write the file direct in nodejs and express js to connect couchbase.).please me any referencevideos

Take a look at this sample app https://github.com/couchbaselabs/pouchdb-angular2

For your Angular app ,

For your node.JS service

  • You can use our SDK that allow you to integrate with Couchbase Server. We support several languages / platforms including node.js

Hello Mam,
Thanks for your’s reply. I am using couch database in my app and it’s also using [angular-cli] and I am able to written server connection code(angular4 to couch database) as soon as I am created database bucket, and my app is running with some port number and I will be giving some input values in textboxes and also I will click submit button and input values are stored in browser table, but not storing in couch database. No error message is displayed. I wrote the code(Recordmodel,routes.js and server.js). How to connect Angular4 /2/angular-cli app to the database . Give me an example using angular2/4.

I installed new version in angular/cli And also every time I getting some errors in Angular/cli
image