Couchbase — Expanding the Oracle Cloud Infrastructure NoSQL Ecosystem
By: Ben Lackey
Tags: NoSQL, Oracle Cloud, Couchbase, Terraform, Oracle

Couchbase is a distributed NoSQL database. It’s a document store in the same class of databases as MongoDB. It differs in some really interesting ways. For instance, Couchbase offers a query language called N1QL that allows a user to write ANSI SQL (including joins!) against the document store. These N1QL queries return JSON documents. It’s a little weird, but simplifies developing web, mobile and IoT applications substantially.

Couchbase has three different products:

Couchbase Server — The core NoSQL database

— The core NoSQL database Couchbase Lite — A lightweight version of the database that runs on Android and IoS devices

— A lightweight version of the database that runs on Android and IoS devices Couchbase Sync Gateway — Manages the synchronization between the mobile and server components

This leads to some amazing use cases with companies like Ryan Air using Couchbase in their mobile app to store information locally, improving customer experience through reduced latency when using a mobile application.

This also provides the ability to continue using the app if disconnected from the server or internet.

Beyond this core functionality, Couchbase offers a variety of components that can be mixed and matched on heterogeneous nodes.

These are:

Data

Query

Index

Full Text Search

Analytics

Eventing

This allows users to scale whatever component of the database their use case demands. Couchbase calls this Multi-Dimensional Scaling (MDS).

I have a particularly warm spot for Couchbase because I was leading their cloud partnerships before coming over to OCI. They have a great team of people that are a pleasure to work with. Today we have a very close partnership with Couchbase. We’ve worked to build out a Terraform module that automates the deployment of Couchbase on OCI.

Writing this module has been a funny continuation of my introduction to Terraform. That was working with Gruntwork.io on the Terraform module they put together to deploy Couchbase on AWS. One of the co-founders, Jim, literally wrote the book on Terraform. It’s a good read. Gruntwork also created an open source framework for testing Terraform code called Terratest. We’re currently looking at ways to use that in our work at OCI.

Prior to the Terraform module, I’d worked with the Infrastructure as Code (IaC) languages that each cloud provides — AWS CloudFormation, Azure Resource Manager and Google Deployment Manager. It’s been really interesting to dive into how Terraform presents a single framework for deploying on any cloud, providing an open source technology that is the basis of a multi-cloud world.

I’ve been really impressed by OCI’s choice to embrace an existing open source technology, both by joining the CNCF as a Platinum member and contributing the OCI provider to the Terraform project.

This open approach to building a cloud seems preferable to technology stacks that lock users to a single platform.

I worked with our video team to record a demo showing how to run the Terraform module to get a Couchbase cluster on OCI:

The module deploys both Couchbase Server and Sync Gateway. You can, of course, configure it to deploy different numbers of nodes, machines and so on. This is just the start of our partnership with Couchbase. Some items coming up include:

Oguz on the OCI team is going to work on improving the module, including revving it to Couchbase 6 and adding MDS support.

We’re currently debating whether to reuse the Python template generator approach I’ve used on some other technologies or wait for the control structures that Terraform 0.12 is introducing.

Blog post on the Kubernetes Operator for Couchbase on OKE coming shortly

We’re also starting to run some POCs of Couchbase on OCI. If you’re interested in learning more please reach out to me at ben.lackey@oracle.com or on twitter @benofben.