Glossary of SDK-related Terms

    Unpicking the tangled alphabet soup of the Couchbase Platform, from an SDK perspective.

    The Couchbase Data platform offers several services, and many advanced features, which we document here, in the Couchbase SDK documentation. Below you will find short definitions of many Couchbase-related terms, with links to the pages that describe them in more detail, or show practical examples of their use.

    • Analytics — Couchbase Analytics Service allows longer running queries over big data, whilst taking advantage of Couchbase’s Multi-Dimensional scaling.

    • CAS — Conpare And Swap. A value which is altered each time a document is mutated. Used in Concurrent Document Mutations for a type of optimistic logging.

    • Cert Auth — Certificate Authentication (Enterprise Edition only). A client attempting to access Couchbase Server can present a certificate to the server, allowing the server to check the validity of the certificate. If the certificate is valid, the user under whose identity the client is running, and the roles assigned that user, are verified. If the assigned roles are appropriate for the level of access requested to the specified resource, access is granted.

    • Cluster Provisioning — The primary means for managing clusters is through the Couchbase Web UI which provides an easy to use interface for adding, removing, monitoring and modifying buckets. In some instances you may wish to have a programmatic interface. For example, if you wish to manage a cluster from a setup script, or if you are setting up buckets in test scaffolding. The SDK also comes with some convenience functionality for common Couchbase management requests, particularly in the 3.0 SDK API.

    • Collections — from Server 7.0 (and available as a Developer Preview in Couchbase Server 6.5 and 6.6), Collections allow groupings of documents beneath the Bucket level. Bucket items can optionally be assigned to different collections according to content type.

    • Custom Transcoders — Whenever key-value data is sent to or retrieved from Couchbase Server, the SDK passes the data being sent to a transcoder. The transcoder can either reject the data as being unsupported, or convert it into a byte array and a Common Flag. Many applications will not need to be aware of transcoders, as the defaults support most standard JSON use cases. More advanced transcoding needs can be accomplished if the application implements their own transcoders and serializers.

    • DCP — Database Change Protocol (DCP) is the protocol used to stream bucket-level mutations. DCP is used for high-speed replication of mutations; to maintain replica vBuckets, incremental MapReduce and spatial views, Global Secondary Indexes (GSIs), XDCR, backups, and external connections. This feed is not directly available, and users should look at other low latency alternatives.

    • Durability — Couchbase Server 6.0 and earlier, with 2.0 API versions of the SDK, used Observe style durability; this is still available in most versions of SDK 3.0 for working with earlier Server releases. Couchbase Server 6.5 saw the introduction of Servir-side Durable Writes. See also _Transactions, below.

    • Encryption — see Field Level Encryption, below.

    • Extended Attributes — see XATTRs, below.

    • Eventing — The Eventing Service allows functions to be written, saved, and triggered in response to events. Events include changes made to specified items, and the arrival of scheduled points-in-time. At the time of writing (Couchbase Server 6.6 and SDK 3.0), there is no interaction with the Eventing Service from the SDK.

    • Field Level Encryption (FLE) — encryption of the field or value in a key-value pair, using a FIPS-140-2 compliant cryptography algorithm. Client-side implementation of Field Level Encryption is available in previous (2.x API) versions of the C, .NET, Go, Java], Node.js, PHP, and Python SDKs. It will be enabled in a future release of the third generation SDK, including the Ruby and Scala SDKs. A developer preview is available for the Java SDK 3.0.

    • Full Text Search (FTS) — Create, manage, and query full-text indexes on JSON documents stored in Couchbase buckets. FTS uses natural language processing for indexing and querying documents, provides relevance scoring on the results of your queries, and has fast indexes for querying a wide range of possible text searches. Some of the supported query-types include simple queries like Match and Term queries; range queries like Date Range and Numeric Range; and compound queries for conjunctions, disjunctions, and/or boolean queries.

    • Global Secondary Indexes (GSI) — A Global Secondary Index (GSI) supports queries made by the Query Service on attributes within documents. Secondary indexes — which contain a filtered or a full set of keys in a given bucket — are optional, but increase query efficiency on a bucket. GSIs can be created through the SDK, using the N1QL CREATE INDEX statement. See also Memory-Optimized Index Storage (MOI).

    • JSON & non-JSON — Couchbase Services work with JSON documents (see rfc8259), but non-JSON storage is supported,  including UTF-8 strings, raw sequences of bytes, and language specific serializations --   see the Binary Storage Documentation. Non-JSON formats may be more efficient in terms of memory and processing power (for example, if storing only flat strings, JSON adds an additional syntactical overhead of two bytes per string). Non-JSON documents may be desirable if migrating a legacy application, which is using a customized binary format. JSON’s key-value structure allows the storage of collection data structures such as lists, maps, sets and queues — see the Data Model page; JSON’s tree-like structure allows operations against specific paths in the Document, and efficient support for these data structures.

    • Key-Value Operations — KV Operations work directly on the document, for CRUD operations on documents whose identity (key) is known.

    • MapReduce Views — MapReduce Views uses distributed Map-Reduce for very fast aggregation operations (fast, because the indexes are pre-computed results) — ideal for pre-grouped aggregations, such as grouping temporal data sets (by day, by month, etc.). Views’ spatial support allows for fast searching over extensive geo-spatial data in Couchbase Data Platform 5.x  —  however, Spatial Views are no longer supported in Couchbase Server 6.x, and so are not found in SDK 3.x. Continuing improvements to our Query Service makes the latter usually a better choice, particularly as Views does not scale as well as the other services, lacking a global Index node.

    • N1QL — Couchbase’s powerful SQL-like language allows queries in a format familiar to Database Administrators.

    • Query — The Couchbase Query Service uses a SQL-like language for powerful queries across documents.

    • RBAC — Role-Based Access Control allows secure, fine-grained access privileges, assigned to fixed roles. The 3.0 API allows some user managemeng programmatically from the SDK.

    • Scope — from Server 7.0 (and available as a Developer Preview in Couchbase Server 6.5 and 6.6), Collections allow groupings of documents beneath the Bucket level, and Scopes group together Collections. Collections might be assigned to different scopes according to content-type, or to deployment-phase (e.g., test and production). Applications can be assigned per-scope access rights, allowing each application to access only those collections it requires.

    • Sub-Document Operations — Sub-Document retrievals only retrieve relevant parts of a document and Sub-Document updates only require sending the updated portions of a document. Sub-Document operations are also atomic, in that if one Sub-Document mutation fails then all will, allowing safe modifications to documents with built-in concurrency control.

    • Transactions — Distributed ACID Transactions guarantee that multiple documents can be updated atomically. They are available for the C & C++, .NET, and Java SDKs.

    • Transcoders — See Custom Transcoders, above.

    • Virtual XATTRs — Virtual Extended Attributes (VXATTR) consist of metadata on an individual document, generated on-demand to expose storage-level document metadata, such as expiry to expose document expiration.

    • XATTRs — Extended Attributes (XATTRs), built upon the Sub-Document API, allow developers to define application-specific metadata that will only be visible to those applications that request it or attempt to modify it. This might be, for example, meta-data specific to a programming framework that should be hidden by default from other frameworks or libraries, or possibly from other versions of the same framework. They are not intended for use in general applications, and data stored there cannot be accessed easily by some Couchbase services, such as Search.

    Further Reading

    Glossaries are available for:

    Only the Server Glossary takes the form of an index, linking to other pages, in the same manner as this page.