Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Eventing: Introducing Advanced Bucket Accessors in Couchbase

Blog post from Couchbase

Post Details
Company
Date Published
Author
Jon Strabala, Principal Product Manager, Couchbase
Word Count
2,532
Language
English
Hacker News Points
-
Summary

In Couchbase Server 6.6.1, the introduction of Advanced Bucket Accessors enhances the key-value store functionality beyond what Basic Bucket Accessors offer by providing a more comprehensive set of operations, including setting expirations, solving race conditions via Check-And-Set (CAS), and manipulating key-value items under high contention. Although Basic Bucket Accessors are easier and slightly faster, Advanced Bucket Accessors allow for more sophisticated operations such as handling concurrent mutations with JavaScript-driven logic, performing distributed atomic counter operations, and setting document expirations. The advanced operations introduced include GET, INSERT, UPSERT, REPLACE, DELETE, INCREMENT, and DECREMENT, each allowing for more complex interaction with the stored data, such as checking metadata, handling CAS mismatches, and managing document lifecycles with expiration times, all of which are not possible with the simpler Basic Bucket Accessors. Examples and detailed documentation are available to illustrate the implementation of these advanced operations, demonstrating their potential to optimize data handling and ensure data integrity in concurrent processing environments.