Skip to Content
Aerospike: Up and Running
book

Aerospike: Up and Running

by V. Srinivasan, Tim Faulkes, Albert Autin, Paige Roberts
October 2024
Intermediate to advanced
220 pages
6h 26m
English
O'Reilly Media, Inc.
Content preview from Aerospike: Up and Running

Chapter 4. Advanced Operations

So far you have looked at Aerospike’s basic operations, primarily reading and writing data. We have discussed how data is stored in bins and that multiple bins can be read or written in a single call. What you’re going to look at now is some operations that go beyond those basics.

First, you’ll look at a few of the many capabilities of the operate() command. In particular, you’ll see how to add, append, and update data in some of the more complex data types such as lists and maps. Then, you’ll learn some of the basics of how to use expressions to create conditional writes and derived reads, among other interesting data operations. You’ll be introduced to more advanced batch operations, secondary indexes, multiple predicate queries, and a host of other aspects of using Aerospike.

The operate() Command

One of the most powerful commands on a single record is the operate() command. In fact, it is so powerful that all other single record commands are just syntactic sugar that wrap the operate() command. If you have been following along with the examples in this book so far, you have actually used this command, albeit wrapped in a get() or put() method.

operate() allows you to perform an arbitrary complex list of operations on a single record, taking a list of Operation classes containing the appropriate actions. So for example, in a single call, you could insert one bin, add 10 to the contents of another bin, work out the size of a map in a third bin, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GitOps and Kubernetes

GitOps and Kubernetes

Billy Yuen, Todd Ekenstam, Jesse Suen, Alex Matyushentsev
Docker in Action, Second Edition

Docker in Action, Second Edition

Stephen Kuenzli, Jeffrey Nickoloff
gRPC: Up and Running

gRPC: Up and Running

Kasun Indrasiri, Danesh Kuruppu

Publisher Resources

ISBN: 9781098155599Errata Page