Company
Date Published
Author
Dustin Sallings, Chief Architect, Couchbase
Word count
1202
Language
English
Hacker News points
None

Summary

We have introduced two new protocol operations: Sync and Touch. The Sync operation provides a barrier where you wait for an application's data to change state in specific ways such as having an item change from a known value or achieve a specified level of durability. This is useful for ensuring that critical data is persisted across the network interface and disk. The Touch operation allows you to adjust expiration on an existing key without touching the value, which is useful for implementing sliding window expiration policies. We have also added a Gat command that returns the data and adjusts the expiration at the same time. These new operations are designed to be orthogonal to other commands while enhancing functionality in a way that lets you do things that couldn’t be done before. They can be used to implement features such as rate limiting inserts, storing session data with idle data being removed quickly but active data sticking around as long as it’s active.