View Source

There are quite a few documents on the architecture of Couchbase Server including the appropriate sections in the [manual for 1.8|http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-architecture.html] and the [manual for 2.0|http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-architecture.html].  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.

h1. Couchbase Component Architecture

All of the source for Couchbase Server [resides on github|http://github.com/couchbase]. 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.

h1. Building Couchbase from Source

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|http://code.google.com/p/git-repo/downloads/list].

One downloaded and install you can use repo to clone the necessary repo and crate a structure suitable for building:

{code}
$ mkdir couchbase
$ cd couchbase
$ repo init -u git://github.com/membase/manifest.git -m <branch_name>
$ repo sync
{code}

Once the synchronisation has completed you can run make to build Couchbase:

{code}
$ make
{code}