Spatio Client
A lightweight, native Rust RPC client for connecting to remote Spatio database servers.
Overview
spatio-client provides a high-performance, async client for interacting with spatio-server instances over TCP. It uses the same binary RPC protocol as the server for maximum efficiency.
Features
- Async/Await: Built on
tokiofor non-blocking I/O - Connection Pooling: Reuses TCP connections across operations
- Automatic Reconnection: Transparently reconnects on connection loss
- Configurable Timeouts: Set custom timeouts for operations
- Full API Coverage: Supports all Spatio database operations
Usage
use SpatioClient;
use Point3d;
use Duration;
async
API
The client mirrors the embedded database API:
upsert(namespace, object_id, position, metadata, options)get(namespace, object_id)delete(namespace, object_id)query_radius(namespace, center, radius, limit)query_bbox(namespace, min_x, min_y, max_x, max_y, limit)knn(namespace, center, k)stats()- And more...
Performance
The client uses bincode for serialization and length-delimited framing for minimal overhead. Typical latency for local connections is sub-millisecond.
License
MIT - see LICENSE