There are quite a few documents on the architecture of Couchbase Server including the appropriate sections in the manual for 1.8 and the manual for 2.0. Those obviously reflect how the components come together, but much like an automotive mechanic has a different view of your vehicle than you do, developers of Couchbase see things a little differently.
All of the source for Couchbase Server resides on github. Couchbase itself is made up of a number of different components, including:
- memcached - Core data networking server.
- bucket_engine - Multitenancy plug-in to memcached.
- ep-engine - Persistence plug-in to memcached.
- libvbucket - Library for elastic key hashing.
- vbucketmigrator - Item replication and migration utility.
- libconflate - Library to allow moxi to support dynamic configuration.
- moxi - Proxy for memcached and membase
- membase-cli - Command-line utilities.
- ns_server - Cluster management, monitoring and orchestration, with web UI console and REST administration API.
- memcachetest - The memcachetest tool. A simple test utility for generating a large number of get and set operations.
In order to build Couchbase from source you need to ensure that you have installed the necessary pre-requisite components and libraries before you start. Check the Couchbase Manifest page for more details.
You will also need to install the repo tool, which simplifies the process of downloading the individual Github repos that make up the project. You can get a copy of the tool from here.
One downloaded and install you can use repo to clone the necessary repo and crate a structure suitable for building:
$ mkdir couchbase
$ cd couchbase
$ repo init -u git://github.com/membase/manifest.git -m <branch_name>
$ repo sync
Once the synchronisation has completed you can run make to build Couchbase: