gRPC protocol reference
For application code, use the .NET driver, TypeScript driver, or Python driver. The libraries expose connections, parameters, queries, and transactions through their own APIs. You do not need to generate Protobuf bindings or manage stream messages to use CamusDB.
The .NET and TypeScript drivers support gRPC as a transport option; Python currently uses REST. Selecting gRPC in a supported driver leaves encoding, authentication metadata, transaction handles, and stream management to the library. Use the retry helpers for retryable work.
When to use the gRPC API
This page documents the public protocol for driver authors, custom clients, and transport diagnostics. It describes the wire contract behind the driver APIs. The client endpoint uses HTTP/2 on port 5096 by default and reaches the same SQL engine as the HTTP API.
Enable and configure the endpoint
The endpoint is enabled by default. Configure or disable it in config.yml:
grpc_enabled: true
grpc_port: 5096
grpc_certificate:
Set grpc_certificate to a PFX certificate for the client-facing gRPC
listener. If it is empty, CamusDB reuses a configured raft_certificate, the
certificate of the node's internal cluster port. Without either certificate,
the listener uses plaintext HTTP/2, which suits local development and private
test networks.
Driver users configure credentials in their connection settings. A custom
gRPC client uses the CamusAuth service to exchange a user
name and password for a bearer token. gRPC clients then send that token in the
request metadata:
authorization: Bearer camus_<id>.<secret>
Authentication failures return UNAUTHENTICATED, and privilege failures
return PERMISSION_DENIED. See
Authentication And Authorization.
The Protobuf contract lives in the CamusDB source tree at
CamusDB.Grpc.Contracts/Protos/camus_sql.proto. Generate your client bindings
from that file with the standard gRPC tools for your language.