Skip to main content

Crate sochdb_grpc

Crate sochdb_grpc 

Source
Expand description

SochDB gRPC Services

This crate provides a comprehensive gRPC interface for SochDB operations. It implements a “Thick Server / Thin Client” architecture where all business logic lives in the Rust server, enabling thin SDK wrappers in any language.

§Services

  • VectorIndexService: HNSW vector operations
  • GraphService: Graph overlay for agent memory
  • PolicyService: Policy evaluation and enforcement
  • ContextService: LLM context assembly with token budgets
  • CollectionService: Collection management
  • NamespaceService: Multi-tenant namespace management
  • SemanticCacheService: Semantic caching for LLM queries
  • TraceService: Trace/span management
  • CheckpointService: State checkpoint and restore
  • McpService: MCP tool routing
  • KvService: Basic key-value operations

§Usage

# Start the gRPC server
sochdb-grpc-server --port 50051

# From Python client
import grpc
from sochdb.proto import sochdb_pb2, sochdb_pb2_grpc

channel = grpc.insecure_channel('localhost:50051')
stub = sochdb_pb2_grpc.VectorIndexServiceStub(channel)

Re-exports§

pub use server::VectorIndexServer;
pub use error::GrpcError;
pub use blocking_pool::BlockingPool;
pub use blocking_pool::BlockingPoolConfig;
pub use blocking_pool::BlockingPoolManager;
pub use blocking_pool::PoolType;
pub use health_service::HealthService;
pub use health_service::HealthServiceConfig;
pub use health_service::HealthCheckResult;
pub use health_service::DegradedCondition;
pub use security::SecurityService;
pub use security::SecurityConfig;
pub use security::Principal;
pub use security::Capability;
pub use security::AuthError;

Modules§

blocking_pool
Async Boundary Hardening
checkpoint_server
Checkpoint Service gRPC Implementation
collection_server
Collection Service gRPC Implementation
context_server
Context Service gRPC Implementation
error
Error types for gRPC service
graph_server
Graph Service gRPC Implementation
health_service
Health Service with Kubernetes Probe Semantics
kv_server
KV Service gRPC Implementation
mcp_server
MCP Service gRPC Implementation
namespace_server
Namespace Service gRPC Implementation
observability
Observability Hardening
policy_server
Policy Service gRPC Implementation
proto
security
Security Baseline for Marketplace
semantic_cache_server
Semantic Cache Service gRPC Implementation
server
gRPC Server implementation for Vector Index Service
trace_server
Trace Service gRPC Implementation