Will couchbase server also sync to gateway like couchbase lite

is it possible to sync couchbase server through the gateway to a main couchbase server? So for example, lets say I have 10 mobile devices with couchbase lite, a gateway, and a main couchbase server. But I want another desktop running couchbase server which synchs just like one of the mobile devices. Or is this handled in server to server sync? Sorry if this seems obvious, but I’m new to couchbase…

Thanks

Couchbase Server and Couchbase Lite speak different but related languages and Sync Gateway is meant to communicate between them. Having a Sync Gateway sitting between two servers will not make sense since the Server does not know anything about what Sync Gateway and Couchbase Lite are trying to do.

That being said, Couchbase Lite is not a mobile-only library and you can certainly use it in applications on a desktop machine. (Using either Objective-C for OS X or Java / .NET for multi platform)

Ok, got it. Thanks for the info.

Confusingly, Couchbase Server has its own replication protocol called XDCR, which you can read about in the server docs. It’s not really designed for the same use cases though; in particular it doesn’t handle conflicts, so you can’t safely use it if docs are changing on both sides. It gets used for things like mirroring a master cluster to a slave one in a remote data center to increase availability.

There is an experimental tool called SGReplicate written by @traun, which lets two Sync Gateways replicate with each other. That would do what you want, I think. You can find it on Github: https://github.com/couchbaselabs/sg-replicate