cmake -B build -G Ninja
cmake --build build -j$(nproc)
cmake --build build -j$(nproc) && ./build/tests/test_vector_storage
proto/database.proto — gRPC service and message definitionsservice/src/ — Database server implementation
memory_store.hpp/.cpp — In-memory document + vector storagedocument.hpp — Document and CollectionOptions typesdatabase_grpc_impl.cpp — gRPC request handlerspersistence/ — WAL, snapshots, persistence managermigrations/ — Migration runnerclient/ — C++ client library (smartbotic-db-client)tests/ — Integration testsSimilaritySearch RPC. Vectors use _vector document field, stored in parallel float arrays, persisted through WAL (VEC_PUT/VEC_DELETE) and snapshots (v3 format). Collection vector_dimension option is immutable after creation.PatchDocument RPC merges fields into existing documents atomically (server-side, within collection lock). Client patch() method. update() uses automatic optimistic locking with retry. See docs/integration-guide.md for concurrency patterns._views system collection, created via create_view migration op or createView RPC. Writes on view names are rejected.timestamp_precision config ("ms" default, "ns" for rapid-write collections). Stamps _created_at/_updated_at at the configured resolution, cached hot-path lookup. configureCollection RPC flips the config atomically; migrateCollectionTimestamps RPC converts existing data during maintenance windows (idempotent via 10^15 threshold)..tmp + fsync + rename + post-write verification), loader fallback chain across snapshots, MySQL-style recovery modes (normal / snapshot_fallback / wal_only / best_effort / force_empty) selectable via --recovery-mode flag or recovery.mode config. Non-trivial recovery (fallback, WAL-only, forced empty) automatically enters read-only mode — operator must smartbotic-db-cli unlock or pass --force-readwrite to accept writes. Exit code 10 when recovery is refused.ResourceQuota + per-RPC-type stream limits (Subscribe, UploadFile, DownloadFile). Configurable under storage.grpc. Excess streams get RESOURCE_EXHAUSTED with operator log./etc/smartbotic-database/conf.d/*.json deep-merges over config.json using RFC 7396 semantics (arrays replace, objects merge). Lets consumer debs ship tuned settings without touching the upstream conffile. Strict on syntax errors (exit 11), lenient on unknown keys.eviction_chunk_size=1000, eviction_chunk_pause_ms=50, hot_write_floor_ms=30000. Four pressure levels (normal/soft/hard/emergency) gate behavior: soft = trickle, hard = aggressive + MEMORY_PRESSURE_HIGH event, emergency = admission control rejects writes with RESOURCE_EXHAUSTED. Per-collection memory_priority (low/normal/high) biases selection. Quiesce skips docs with in-flight writes. WAL-fallback no longer holds per-collection mutex during disk I/O.Client::getMemoryStats() returns per-collection stats + pressure level. Client library auto-retries write RPCs on DEADLINE_EXCEEDED/RESOURCE_EXHAUSTED/UNAVAILABLE with exponential backoff + jitter (writeRetries=3, writeRetryBackoffMs=100). Reads are not auto-retried.Canonical source for all smartbotic-database Debian packages.
Replaces the old shadowman-database and callerai-storage packages.
# Production (Docker, Debian 13)
./packaging/build.sh # Build 4 .debs
./packaging/build.sh --rebuild-base # Rebuild Docker base image
./packaging/build.sh --sync --suite trixie # Build + publish to repository.smartbotics.ai
# Local development (native, current system)
./packaging/build.sh --local # Build 4 .debs
./packaging/build.sh --local --install # Build + install locally
| Package | Contents | Deployed where |
|---|---|---|
smartbotic-database |
Server binary + systemd + config | Production DB servers |
libsmartbotic-db-client |
Shared .so (runtime) |
All production machines |
libsmartbotic-db-client-dev |
Headers + linker symlink + .proto + cmake config |
Docker build images, dev workstations |
smartbotic-db-cli |
CLI tool | Anywhere (optional) |
After ./packaging/build.sh --local --install, consumer projects can use:
find_package(smartbotic-db-client REQUIRED)
target_link_libraries(myapp PRIVATE smartbotic::db-client)
The submodule fallback still works for projects that haven't switched (BUILD_SHARED_LIBS=OFF).
| Project | Depends on | Min version | Migrations dir |
|---|---|---|---|
| shadowman-cpp | smartbotic-database (>= 1.2.0) |
1.2.0 | /opt/shadowman/share/shadowman/migrations/json |
| callerai | smartbotic-database (>= 1.2.0) |
1.2.0 | /etc/callerai/migrations |
Bump VERSION for API/protocol changes. Deb revision (-N) for packaging-only changes.