Migrating from Membase

Migrating from Membase

Migration guidelines for Membase users.

For an existing Membase user, the primary methods for creating, adding, manipulating, and retrieving data remain the same. In addition, the background operational elements of the Couchbase Server deployment will not differ from the basic running of a Membase cluster.

Term and concept differences

The following terms are new or updated in Couchbase Server:
Views and the associated terms of the map and reduce functions used to define views. Views provide an alternative method for accessing and querying information stored in key-value pairs within the Couchbase Server. Views allow you to query and retrieve information based on the values of the contents of a key-value pair, provided the information has been stored in a JSON format.
JSON (JavaScript Object Notation) is a data representation format that is required to store the information in a format that can be parsed by the View system.
Membase Server
This is now the Couchbase Server.
Membase buckets
These are now the Couchbase buckets

Consistent functionality

The core functionality of Membase, including the methods for basic creation, updating, and retrieval of information all remain identical within Couchbase Server. You can continue to use the same client protocols for setting and retrieving information.

The administration, deployment, and core of the Couchbase Web Console and administration interfaces are also identical. There are updates and improvements to support additional functionality which is included in existing tools. These include views-related statistics, and an update to the Web Administration Console for building and defining views.

Changed functionality

The main difference available in the Couchbase Server is that, in addition to the key-value data store nature of the database, you can also use views to convert the information from individual objects in your database into lists or tables of records and information. Through the view system, you can also query data from the database based on the value (or fragment of a value) of the information that you have stored against a key.

This fundamental differences means that applications no longer need to manually manage the concept of lists or sets of data by using other keys as a lookup or compounding values.

Operational and deployment differences

The main components of the operation and deployment of your Couchbase Server remain the same as with the Membase Server. You can add new nodes, fail over, rebalance and otherwise manage your nodes.

However, the introduction of views means that you need to monitor and control the design documents and views that are created alongside your bucket configurations. Indexes are generated for each design document (that is multiple views), and for optimum reliability you might want to back up the generated index information to reduce the time to bring up a node in the event of a failure, as building a view from raw data on large datasets can take a significant amount of time.

In addition, you need to understand how to recreate and rebuild view data, and how to compact and clean up view information to help reduce disk space consumption and response times.

Client and application changes

Clients can continue to communicate with the Couchbase Server using the existing memcached protocol interface for the basic create, retrieve, update and delete operations for key-value pairs. However, to access the view functionality you must use a client library that supports the view API (which uses HTTP REST).

To build views that can output and query your stored data, your objects must be stored in the database in the JSON format. If you have been using the native serialization of your client library to convert a language specific object so that it can be stored into the Membase Server, you might need to structure your data and use a native to JSON serialization solution, or reformat your data so that it can be formatted as JSON.