Skip to main content

Request DB

The Request DB provides a set of operations for managing vector stores and interacting with their contents. These APIs wrap low-level gRPC calls in a convenient Rust interface, handling request construction, tracing propagation, and response parsing. Together, they enable you to create, query, update, and delete records within the database in a structured and reliable way.

Each operation follows the same execution pattern:

  • Request preparation β€” Input parameters are wrapped in a tonic::Request object.

  • Execution β€” The client forwards the request to the DB service.

  • Response handling β€” The response is unwrapped and returned in a typed result.

Capabilities​

With Request DB, you can:

  • Manage stores β€” Create, list, and drop vector stores.

  • Insert and update data β€” Use set to add or modify records.

  • Query data β€” Fetch by key, by predicate, or by similarity (get_key, get_pred, get_sim_n).

  • Delete data β€” Remove records by key or predicate (del_key, del_pred).

  • Index management β€” Create and drop indexes for predicate and algorithm-based queries.

  • Server & client metadata β€” Retrieve cluster information (info_server, list_clients).

Behavior​

All Request DB operations are designed to:

  • Ensure consistency β€” Calls execute atomically on the server side.

  • Support idempotency β€” Repeated calls with the same parameters will yield consistent results.

  • Handle concurrency β€” Multiple clients can safely read and write without corrupting data.

  • Propagate observability β€” Optional tracing IDs allow for full request tracing in distributed environments.

Below are the operations for managing vector stores, storing and retrieving vectors, performing similarity queries, and handling indexes in the Ahnlich database.