Newsletters




CouchDB and Membase Marriage Bears Fruit


Bookmark and Share

One of the earliest of the new generation of non-relational databases was CouchDB. CouchDB was born in 2005 when former Lotus Notes developer Damien Katz foresaw the nonrelational wave that only fully arrived in 2009. Katz imagined a database that was fully compatible with web architectures — and more than a little influenced by Lotus Notes document database concepts.

CouchDB is a document-oriented database that uses JavaScript Object Notation (JSON) documents as the unit of storage. JSON is a self-describing document type similar in some respects to XML but more compact and easier to work with. The HTTP REST protocol is the basis for the CouchDB API, and JavaScript is used as the internal language, which can be used to create views, functions, and MapReduce routines.

Katz also foresaw the importance of mobile device synchronization, so CouchDB allows documents to be managed and synchronized between multiple servers and offline devices.

By the time the interest in nonrelational databases peaked in 2009, CouchDB already had several years of active development and seemed well placed to benefit from the increasing buzz around NoSQL.

Membase was another nonrelational system that was experiencing significant uptake during the NoSQL gold rush of 2009-2010. The Membase database was rooted in the idea of adding persistence to the extremely popular Memcached framework. Memcached is a distributed read-only object cache commonly deployed in conjunction with MySQL to reduce write load. Objects are distributed across multiple Memcached nodes, and can be located by a hash key lookup. If the data is in the Memcached server, a database read is avoided. 

Membase provided a Memcached API compatible solution in which data could also be modified and persisted to disk.  Membase, therefore, was particularly attractive for those who had an existing investment in Memcached technology, offering the possibility that an application could be converted to Membase from Memcached/MySQL. It’s likely, however, that many Membase applications were built from the ground up on Membase rather than being converted from Memcached/MySQL

Membase was initially very well known as the database underlying Zynga’s incredibly popular Farmville online game. Farmville’s rapid growth in popularity among users provided a proof-point for the scalability and reliability of Membase. 

Meanwhile, despite CouchDB’s many technical achievements, the CouchDB company (CouchOne) appeared to be struggling to establish a commercial niche, and lacked a viable scale-out architecture. In early 2011, a merger between Membase and CouchOne was announced, and the resulting company was called CouchBase.

Early on, the nature of the merged technologies was unclear, and some were not convinced there would be automatic leverage between the Erlang-based CouchDB and Membase, based in C++.  What was exciting was the possibility of merging the well-respected and proven data model and functionality found in CouchDB with the clustering and scalability features of Membase. The upcoming CouchBase 2.0 server edition may deliver on this promise, merging many of the functional advantages of CouchDB with the scalability and reliability of Membase. 

Meanwhile CouchBase has donated the “old” CouchDB to the Apache community. Time will tell how much activity the Apache project will sustain, though there certainly are many passionate CouchDB developers.  Damien Katz, however, has announced he will now be working almost exclusively on Couchbase. 

CouchBase already claims an impressive list of production implementations, including those by AOL, Starbucks, Salesforce.com, and Vimeo. Indeed, Couchbase claims to be the NoSQL “market share leader.” That’s quite a claim, and one that would probably be disputed by other companies—10gen, DataStax, and Cloudera — that have NoSQL database offerings. Nevertheless, CouchBase certainly deserves to be considered a leader in the NoSQL market.      

 


Related Articles

Couchbase provides a distributed NoSQL document database for interactive applications. The company just released Couchbase Server Enterprise Edition 2.5 with new high availability and security features. Bob Wiederhold, president and CEO of Couchbase, talks with DBTA about the new release and how the landscape for NoSQL database technology is changing.

Posted February 12, 2014

Sponsors