Couchbase Server
Developer(s) | Couchbase, Inc. |
---|---|
Initial release | August 2010 |
Stable release | 4.1 / December 9, 2015 |
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 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.
Couchbase Server provides on-the-wire client protocol compatibility with memcached,[2] but is designed to add disk persistence, data replication, live cluster reconfiguration, rebalancing and multitenancy with data partitioning.
In the parlance of Eric Brewer’s CAP theorem, Couchbase is a CP type system meaning it provides consistency and partition tolerance. However Couchbase Server can be set up as an AP system with multiple clusters using XDCR (Cross Data Center Replication).
Product history
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 NHN to a new project on membase.org in June 2010.
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. On December 2012, Couchbase Server 2.0 was released, with new features including a new JSON document store, indexing and querying, incremental MapReduce and cross datacenter replication.[3]
High-level architecture
Every Couchbase node is architecturally identical consisting of a Data Service, Index Service, Query Service, and Cluster Manager component. With the introduction of Multi-dimensional Scaling in 4.0, the three Services can be distributed to run on separate nodes of the cluster if needed. This allows for workload isolation and scaling of each Service separately.
Cluster manager
The 'cluster manager' supervises the configuration and behavior of all the servers in a Couchbase cluster. It configures and supervises internode behavior like managing replication streams and rebalancing operations. It also provides metric aggregation and consensus functions for the cluster, and a RESTful cluster management API. The cluster manager is built atop Erlang/OTP, a proven environment for building and operating fault-tolerant distributed systems.
Replication and failover
- Multi-model replication support: Peer-to-peer replication support with underlying architecture supporting master-slave replication
- Configurable replication count: Balance resource utilization with availability requirements
- High-speed failover: Fast failover to replicated items based upon request
- XDCR: Cross Data Centre Replication [4]
Data manager
The data manager is responsible for storing and retrieving documents in response to data operations from applications.
- Asynchronously writes data to disk after acknowledging write to client. In version 1.7 and later, applications can optionally ensure data is synced to more than one server or to disk before acknowledging a write to the client.
- Tunables to define item ages that affect when data is persisted.
- Supports working set greater than a memory quota per "node" or "bucket"
- Tunables to affect how max memory and migration from main-memory to disk is handled.
- Configurable “tap” interface: External systems can subscribe to filtered data streams supporting, for example, full text search indexing, data analytics or archiving.[5]
Data format
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
Couchbase Server includes a built-in multithreaded object-managed cache that implements memcached compatible APIs such as get, set, delete, append, prepend etc.
Storage engine design
Couchbase Server has a tail-append storage design that is immune to data corruption, OOM killers or sudden loss of power. ["immune" to sudden loss of power is a claim that would need to be substantiated or documented, since appending to a file could still result in loss of data if power was interrupted in the middle of a disk write operation] 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
Cisco published a benchmark that measures the latency and throughput of Couchbase Server [6] with a mixed workload. Another performance benchmark done by Altoros, compares Couchbase Server with other NoSQL database solutions.[7]
Licensing and support
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 as Open Source (Apache 2.0 license[8]) distribution, and an Enterprise Edition for commercial use.[9] It is a good idea to keep up on support policies and software end-of-life.
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
N1QL (pronounced nickel; Non-first Normal Form Query Language or Couchbase Query Language) is a query language developed by Couchbase for finding data in the document-oriented database, Couchbase Server.
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.
Production deployments
Large-scale mission critical deployments of Couchbase Server are tracked by Couchbase, Inc. Notable users of Couchbase include:
See also
Bibliography
- Brown, MC (June 22, 2012). Getting Started with Couchbase Server (1st edition). O'Reilly Media. p. 88. ISBN 978-1449331061.
- "Balancing Oracle and open source at Orbitz". GigaOM. 21 September 2012.
- 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
- ↑ "The Unreasonable Effectiveness of C". Damien Katz. 2013-01-08. Retrieved 2013-06-04.
- ↑ "NewProtocols - memcached - Klingon - Memcached - Google Project Hosting". Code.google.com. 2011-08-22. Retrieved 2013-06-04.
- ↑ "Couchbase 2.0 released; implements JSON document store". ZDNet. 12 December 2012.
- ↑ http://www.couchbase.com/wiki/display/couchbase/XDCR+Protocol
- ↑ Want to know what your memcached servers are doing? Tap them.
- ↑ "Cisco and Solarflare Achieve Dramatic Latency Reduction for Interactive Web Applications with Couchbase, a NoSQL Database" (PDF). Cisco Systems. Retrieved 2013-06-04.
- ↑ "Benchmarking Couchbase". Couchbase. 2012-10-30. Retrieved 2015-03-04.
- ↑ "Couchbase Open Source Project".
- ↑ "Couchbase Server Editions". Couchbase.
External links
- Official website
- Couchbase Documentation
- Couchbase Forums
- Couchbase Twitter page
- Couchbase Blog page
- Couchbase Events page
- Couchbase Developer SDK's
- Couchbase Training (both online and in-person)