
Couchbase Server
The NoSQL document database
Thanks to a flexible JSON model, Couchbase Server makes it easy to modify your applications without the constraints of a fixed database schema. Submillisecond, high-throughput reads and writes give you consistent high performance. Couchbase Server is easy to scale out, and supports topology changes with no downtime.
Easy Scalability
It’s easy to scale your database layer with Couchbase Server, whether within a cluster or across clusters in multiple data centers. With one click of a button, no downtime, and no changes to your app, you can grow your cluster from 1 to 25 to 100s of servers while keeping the workload evenly distributed.
Always On
With Couchbase Server, your application is always online, 24x365. Whether you are upgrading your database, system software or hardware – or recovering from a disaster – you can count on zero app downtime with Couchbase Server.
Consistent High Performance
Couchbase Server’s consistent submillisecond response times means an awesome experience for your app users. Consistent, high throughput lets you serve more users with fewer servers. Data and workload are equally spread across all servers.
Flexible Data Model
You shouldn’t have to worry about the database when you change your application. With Couchbase Server, there is no fixed schema so records can have different structure, and be changed any time, without modification to other documents in the database.
What’s New in Couchbase Server 2.0

Flexible JSON Documents
The JSON document model reduces development friction. Instead of rigid schemas and risky migrations, a document database accepts new fields as needs change.

Indexing and Querying
Use powerful secondary indexes to see inside your data. Couchbase maintains the index and distributes your data and queries across the cluster.

Cross Datacenter
Replication (XDCR)
XDCR helps you offer a truly high-performance experience to users worldwide. Replication also provides resilience for infrastructure failures.

Incremental Map Reduce
Incremental map reduce provides powerful aggregates and summaries for real-time analytics, even with large datasets.
Couchbase SDKs
Java Resources
Community
Learn how to use Couchbase Server with Java in this recorded webinar. There’s also a community Clojure driver that is worth checking out. Also, there’s a Couchbase Labs JRuby driver. Please fork!
System.out.println("Hello Couchbase!");
CouchbaseClient client = new CouchbaseClient(
Arrays.asList(URI.create("http://<your-ip>:8091/pools")),
"beer-sample",""
)
// Set and print a nice greeting
client.set("greeting", 0, "Hello Couchbase!");
System.out.println(client.get("greeting"));
// Run a view query (first 10 beers/breweries)
View view = client.getView("beer", "brewery_beers");
Query query = new Query();
query.setIncludeDocs(true).setLimit(10);
ViewResponse response = client.query(view, query);
for(ViewRow row : response) {
System.out.printf("Id:%s Name:%s Doc:%s\n",
row.getId(), row.getKey(), row.getDocument());
}
// Disconnect
client.shutdown(3, TimeUnit.SECONDS);
Ruby Resources
Community
Learn how to use Couchbase Server with Rails in this tutorial.
If you’re deploying to Heroku you might need this build pack. Here’s a blog post showing Hello World in Ruby.
puts "Hello Couchbase!"
client.add("beer_Atlantic_Amber", new_beer)
view = client.design_docs["beers"].by_name(:limit => 1)
view.each(:key => "Atlantic Amber") do |beer|
puts beer["name"]
end
.NET C# Resources
Community
A video webcast about .NET is on YouTube.
Console.WriteLine("Hello Couchbase!");
client.StoreJson(StoreMode.Add, "beer_Atlantic_Amber", newBeer);
var view = client.GetView<Beer>("beers", "by_name")
foreach(var beer in view.Key("Atlantic Amber").Limit(1))
{
Console.WriteLine(beer.Name);
}
libcouchbase C Resources
Community
If you like hacking evented C, maybe you can help with our node.js driver.
printf("Hello Couchbase!");
lcb_http_cmd_t *cmd = calloc(1, sizeof(lcb_http_cmd_t));
lcb_error_t err;
cmd->version = 0;
cmd->v.v0.path = "_design/beers/_view/by_name?key=Atlantic%20Amber";
cmd->v.v0.npath = strlen(item->v.v0.path);
cmd->v.v0.method = LCB_HTTP_METHOD_GET;
cmd->v.v0.content_type = "application/json";
err = lcb_make_http_request(instance, NULL,
LCB_HTTP_TYPE_VIEW, &cmd, &req);
if (err == LCB_SUCCESS) {
/* ... */
}
PHP Resources
Community
Learn how to use Couchbase Server as a session store in this blog post.
echo "Hello Couchbase!"
$cb->set("a", 1);
$result = $cb->view("design_doc","my_view");
foreach($result["rows"] as $row) {
echo $row->key;
}
Python Resources
Community
Do you have suggestions about what we should link to here?
print "Hello Couchbase!"
bucket = client["default"]
beer = { "name" : "Atlantic Amber" }
bucket.set("beer_Atlantic_Amber", 0, 0, json.dumps(beer))
view = bucket.view("_design/beer/_view/by_name", \
key="Atlantic Amber", limit=1)
for row in view:
id = row["id"].__str__()
beer = json.loads(bucket.get(id))
print beer["name"]