Couchbase Server

From Wikipedia, the free encyclopedia
  (Redirected from Membase)
Jump to: navigation, search
Couchbase Server
CouchbaseLogo.svg
Couchbase Server Screenshot.jpg
Developer(s) Couchbase, Inc.
Initial release August 2010 (2010-08)
Stable release
4.5 / June 22, 2016 (2016-06-22)
Development status active
Written in C++, Erlang, C,[1] Go
Operating system Cross-platform
Type Multi-Model Database / Distributed Key-Value / Document Oriented Database
License Apache License (Open Source edition), Proprietary (Free Community edition and Paid Enterprise edition)
Website www.couchbase.com

Couchbase Server, originally known as Membase, is an open-source, distributed (shared-nothing architecture) multi-model NoSQL document-oriented database software package that is optimized for interactive applications. These applications may serve many concurrent users by creating, storing, retrieving, aggregating, manipulating and presenting data. In support of these kinds of application needs, Couchbase Server is designed to provide easy-to-scale key-value or JSON document access with low latency and high sustained throughput. It is designed to be clustered from a single machine to very large-scale deployments spanning many machines. A version originally called Couchbase Lite was later marketed as Couchbase Mobile combined with other software.

Couchbase Server provided client protocol compatibility with memcached,[2] but added disk persistence, data replication, live cluster reconfiguration, rebalancing and multitenancy with data partitioning.

Product history[edit]

Membase was developed by several leaders of the memcached project, who had founded a company, NorthScale, to develop a key-value store with the simplicity, speed, and scalability of memcached, but also provided the storage, persistence and querying capabilities of a database. The original membase source code was contributed by NorthScale, and project co-sponsors Zynga and Naver Corporation (then known as NHN) to a new project on membase.org in June 2010.[3]

On February 8, 2011, the Membase project founders and Membase, Inc. announced a merger with CouchOne (a company with many of the principal players behind CouchDB) with an associated project merger. The merged company was called Couchbase, Inc. In January 2012, Couchbase released Couchbase Server 1.8. In September, 2012, Orbitz said moved some of its systems to use Couchbase.[4] On December 2012, Couchbase Server 2.0 (announced in July 2011 and released in December 12), included a new JSON document store, indexing and querying, incremental MapReduce and replication across data centers.[5][6]

Architecture[edit]

Every Couchbase node consists of a data service, index service, query service, and cluster manager component. Starting with the 4.0 release, the three services can be distributed to run on separate nodes of the cluster if needed. In the parlance of Eric Brewer’s CAP theorem, Couchbase is normally a CP type system meaning it provides consistency and partition tolerance, or it can be set up as an AP system with multiple clusters.

Cluster manager[edit]

The cluster manager supervises the configuration and behavior of all the servers in a Couchbase cluster. It configures and supervises inter-node behavior like managing replication streams and re-balancing operations. It also provides metric aggregation and consensus functions for the cluster, and a RESTful cluster management interface. The cluster manager uses the Erlang programming language and the Open Telecom Platform.

Replication and fail-over[edit]

Data replication within the nodes of a cluster can be controlled with several parameters. In December 2012, replication was also supported between different data centers.[5]

Data manager[edit]

The data manager stores and retries documents in response to data operations from applications. It asynchronously writes data to disk after acknowledging write to client. In version 1.7 and later, applications can optionally ensure data is written to more than one server or to disk before acknowledging a write to the client. Parameters define item ages that affect when data is persisted, and how max memory and migration from main-memory to disk is handled. It supports working sets greater than a memory quota per "node" or "bucket". External systems can subscribe to filtered data streams, supporting, for example, full text search indexing, data analytics or archiving.[7]

Data format[edit]

A document is the most basic unit of data manipulation in Couchbase Server. Documents are stored in JSON document format with no predefined schemas.

Object-managed cache[edit]

Couchbase Server includes a built-in multi-threaded object-managed cache that implements memcached compatible APIs such as get, set, delete, append, prepend etc.

Storage engine[edit]

Couchbase Server has a tail-append storage design that is immune to data corruption, OOM killers or sudden loss of power. Data is written to the data file in an append-only manner, which enables Couchbase to do mostly sequential writes for update, and provide an optimized access patterns for disk I/O.

Performance[edit]

Cisco published a benchmark that measures the latency and throughput of Couchbase Server [8] with a mixed workload. Another performance benchmark done by Altoros, compares Couchbase Server with other NoSQL database solutions.[9]

Licensing and support[edit]

Couchbase Server is a packaged version of Couchbase's open source technology and is available in two variants: a community edition without recent bug fixes with open source software Apache 2.0 license distribution,[10] and an Enterprise Edition for commercial use.[11] Couchbase Server builds are available for Ubuntu, Debian, Red Hat, SUSE, Oracle Linux, Windows and Mac OS X platforms.

Couchbase has officially supported SDKs for the following programming languages .Net, PHP, Ruby, Python, C, Node.js, Java, and Go.

N1QL[edit]

A Couchbase query language called the non-first normal form query language, N1QL (pronounced nickel), is used for finding data in the server. It was announced in March 2015 as "SQL for documents".[12]

The N1QL data model is non-first normal form (N1NF) with support for nested attributes and domain-oriented normalization. The N1QL data model is also a proper superset and generalization of the relational model.

Example[edit]

{
  "email":"test@gmail.com",
  "friends":[
            {"name":"rick"},
            {"name":"cate"}
           ]
}
Like Query
SELECT * FROM `bucket` WHERE LIKE "%@gmail.com";
Array Query
SELECT * FROM `bucket` WHERE ANY x IN friends SATISFIES x.name = "cate" END;

Bibliography[edit]

  • Brown, MC (June 22, 2012). Getting Started with Couchbase Server (1st edition). O'Reilly Media. p. 88. ISBN 978-1449331061. 
  • Ostrovsky, David; Haji, Mohammed; Rodenski, Yaniv (November 26, 2015), Pro Couchbase Server 2nd ed. (2nd ed.), Apress, p. 349, ISBN 978-1484211861 
  • Potsangbam, Henry (November 23, 2015), Learning Couchbase (1st ed.), Packt, p. 202, ISBN 978-1785288593 
  • Vohra, Deepak (August 3, 2015), Pro Couchbase Development: A NoSQL Platform for the Enterprise (1st ed.), Apress, p. 331, ISBN 978-1484214350 

References[edit]

  1. ^ "The Unreasonable Effectiveness of C". Damien Katz. 2013-01-08. Retrieved 2013-06-04. 
  2. ^ "NewProtocols - memcached - Klingon - Memcached - Google Project Hosting". Code.google.com. 2011-08-22. Retrieved 2013-06-04. 
  3. ^ Shashank Tiwari. Professional NoSQL. John Wiley & Sons. pp. 15–16. ISBN 9781118167809. 
  4. ^ "Balancing Oracle and open source at Orbitz". GigaOM. September 21, 2012. Retrieved September 19, 2016. 
  5. ^ a b Andrew Brust (December 12, 2012). "Couchbase 2.0 released; implements JSON document store". ZDNet. 
  6. ^ Derrick Harris (July 29, 2011). "Couchbase goes 2.0, pushes SQL for NoSQL". GigaOm. Retrieved September 19, 2016. }
  7. ^ Want to know what your memcached servers are doing? Tap them.
  8. ^ "Cisco and Solarflare Achieve Dramatic Latency Reduction for Interactive Web Applications with Couchbase, a NoSQL Database" (PDF). Cisco Systems. Retrieved 2013-06-04. 
  9. ^ "Benchmarking Couchbase". Couchbase. 2012-10-30. Retrieved 2015-03-04. 
  10. ^ "Couchbase Open Source Project". 
  11. ^ "Couchbase Server Editions". Couchbase. 
  12. ^ Andrew Slater (March 24, 2015). "Ssssh! don't tell anyone but Couchbase is a serious contender: Couchbase Live Europe 2015". 

External links[edit]