Couchbase Sync Gateway
Gluing Couchbase Lite to Couchbase Server
The Sync Gateway manages HTTP-based data access for mobile clients. It handles access control and data routing, so that a single large Couchbase Server cluster can manage data for multiple users and complex applications.
Product home page
Documentation
Downloads
Build pre-requisites
To build Sync Gateway from source, you must have the following installed:
- Go 1.5 or later with your
$GOPATH
set to a valid directory
- GCC for CGO (required on Sync Gateway 1.2 or later)
Building From source (without dependency pinning)
Warning: while this is the easiest way to build sync gateway from source, there are known issues with this approach that cause certain tests to fail! To be able to run the full unit test suite and have it pass, skip down to the approach to build from source with dependency pinning.
go get -u -t github.com/couchbase/sync_gateway/...
After this operation completes you should have a new sync_gateway
binary in $GOPATH/bin
Running Unit Tests
$ go test github.com/couchbase/sync_gateway/...
Running Benchmarks
go test github.com/couchbase/sync_gateway/... -bench='LoggingPerformance' -benchtime 1m -run XXX
go test github.com/couchbase/sync_gateway/... -bench='RestApiGetDocPerformance' -cpu 1,2,4 -benchtime 1m -run XXX
Building From Source (with dependency pinning)
Running the scripts below will clone this repository and all of it's dependencies (pinned to specific versions as specified in the manifest)
$ mkdir ~/sync_gateway
$ cd ~/sync_gateway
$ brew install repo
$ wget https://raw.githubusercontent.com/couchbase/sync_gateway/master/bootstrap.sh
$ chmod +x bootstrap.sh
$ ./bootstrap.sh
Build
$ ./build.sh
Running Unit Tests
$ ./test.sh
License
Apache 2 license.
Tutorials and Other Resources