Skip to content

Migrating from classic client

For the complete documentation index see: llms.txt

All documentation pages available in markdown.

Applies to

  • Aerospike Developer SDK preview (Java 21+ and Python 3.10+)
  • Aerospike Database 6.0 or later unless a section states otherwise

This guide helps you migrate an existing application from the Classic Aerospike client to the Developer SDK.

Why migrate?

The Developer SDK offers several advantages over the classic client:

  • Cleaner syntax — Chainable, fluent APIs reduce boilerplate
  • AEL queries — Human-readable filter expressions
  • Better error handling — Actionable errors with recovery suggestions
  • Decoupled configuration — Separate connection from behavior

Before you start

  1. Confirm your Aerospike server is compatible (version 6.0 or later).
  2. Install the Developer SDK as a separate package. It does not replace the classic client.
  3. Plan to run both clients side by side during migration if you need a gradual cutover.

Conceptual changes

Connection model

Classic: Direct client with embedded configuration

SDK: Separate Cluster (connection) and Session (behavior)

// Classic: Everything in one place
AerospikeClient client = new AerospikeClient(
new ClientPolicy(),
new Host("localhost", 3000)
);

📖 API reference: Host(String,int) | Host(String,String,int)

Key and record references

Classic: Explicit Key objects with namespace, set, and user key

SDK: DataSet represents namespace + set, .id() creates record references

Key key = new Key("test", "users", "user-1");

📖 API reference: Key

Operation mapping

Create (put)

client.put(null, key, new Bin("name", "Alice"), new Bin("age", 30));

📖 API reference: com.aerospike.client.sdk

Read (get)

Record record = client.get(null, key);
String name = record.getString("name");

📖 API reference: Record.getString(...)

Update

client.put(null, key, new Bin("visits", 1), new Bin("updated", true));

📖 API reference: com.aerospike.client.sdk

Delete

client.delete(null, key);

📖 API reference: com.aerospike.client.sdk

Query with filters

Statement stmt = new Statement();
stmt.setNamespace("test");
stmt.setSetName("users");
stmt.setFilter(Filter.range("age", 21, 100));
RecordSet rs = client.query(null, stmt);
while (rs.next()) {
Record record = rs.getRecord();
// process record
}

📖 API reference: RecordStream.next()

Migration strategy

Option 1: gradual migration

  1. Add Developer SDK dependency alongside classic
  2. Create new features with Developer SDK
  3. Migrate existing code incrementally
  4. Remove classic client when migration complete

Option 2: full migration

  1. Create a feature branch
  2. Replace all classic client calls with Developer SDK equivalents
  3. Run comprehensive tests
  4. Deploy with confidence

What’s not supported (yet)

Some advanced features from the classic client are not yet available in the Developer SDK SDK:

  • Admin operations (cluster management)
  • HyperLogLog
  • GeoJSON queries
  • Some complex expression in the AEL

For these features, continue using the classic client alongside Developer SDK.

Next steps

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?