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.


View all Features

Couchbase Server Highlights

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.

  Learn More

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.

  Learn More

Cross Datacenter
Replication (XDCR)

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

  Learn More

Incremental Map Reduce

Incremental map reduce provides powerful aggregates and summaries for real-time analytics, even with large datasets.

  Learn More

Couchbase SDKs

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!");

// Connect
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);

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!"

new_beer = {"name" => "Atlantic Amber"}
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

Community

A video webcast about .NET is on YouTube.

Console.WriteLine("Hello Couchbase!");

var newBeer = new Beer { Name = "Atlantic Amber" };
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);
}

Community

If you like hacking evented C, maybe you can help with our node.js driver.

printf("Hello Couchbase!");

lcb_http_request_t req;
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) {
        /* ... */
}

Community

Learn how to use Couchbase Server as a session store in this blog post.

echo "Hello Couchbase!"

$cb = new Couchbase("127.0.0.1:8091", "default", "", "default");
$cb->set("a", 1);
$result = $cb->view("design_doc","my_view");
foreach($result["rows"] as $row) {
  echo $row->key;
}
 

Community

Do you have suggestions about what we should link to here?

print "Hello Couchbase!"

from couchbase import Couchbase
client = Couchbase.connect(bucket='beer-sample')
beer = { 'name': 'Atlantic Amber' }
beer_id = 'beer_Atlantic_Amber'
client.set(beer_id, beer)
view = client.query('beer', 'by_name', limit=1, mapkey_single=[beer_id])
for row view:    
    print row.docid
    print row.key
    print row.value