Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 4.85 KB

GRPC_CAPABILITY_MATRIX.md

File metadata and controls

82 lines (66 loc) · 4.85 KB

gRPC capability matrix (state 2026-12-05, issue #575)

What a network client can actually call, and where an optional package is callable. The single source of truth is src/SharpCoreDB.Server.Core/GrpcCapabilityContract.cs; this page is its documentation and GrpcCapabilityContractTests enforces both halves — every RPC the proto declares must be listed, and every RPC must answer the way it is listed here.

Why it exists: the server advertised Analytics and Graph in ConnectResponse.supported_features while ExecuteAnalytics, GraphTraverse and GraphShortestPath answered UNIMPLEMENTED, so a studio could not label a feature "remote" or "local only" honestly (SCDMS ADR-0004, the capability contract).

RPCs

Proto = declared in sharpcoredb.proto. Status is what this build answers, not what the protocol allows.

RPC Status Reach the capability instead with
Connect ✅ implemented —
Disconnect ✅ implemented —
Ping ✅ implemented —
ExecuteQuery ✅ implemented —
ExecuteNonQuery ✅ implemented also the path for all DDL
ExecuteBatch ⛔ UNIMPLEMENTED separate ExecuteNonQuery calls, or one script
PrepareStatement ⛔ UNIMPLEMENTED parameterised ExecuteQuery/ExecuteNonQuery (the engine prepares internally)
ExecutePrepared ⛔ UNIMPLEMENTED re-issue the parameterised statement
ClosePrepared ⛔ UNIMPLEMENTED nothing to close
BeginTransaction / CommitTransaction / RollbackTransaction ✅ implemented one storage transaction at a time per database (#560, #563)
VectorSearch ✅ implemented —
VectorSearchBatch ⛔ UNIMPLEMENTED one VectorSearch per query
GetSchema ✅ implemented tables, columns, constraints (with foreign-key detail) and indexes; opt-in round-trip script (#574)
CreateTable / AlterTable / DropTable ⛔ UNIMPLEMENTED ExecuteNonQuery with the DDL
CreateIndex / DropIndex ⛔ UNIMPLEMENTED ExecuteNonQuery with the DDL
GraphTraverse / GraphShortestPath ⛔ UNIMPLEMENTED local-only: SharpCoreDB.Graph is not exposed over gRPC
ExecuteAnalytics ⛔ UNIMPLEMENTED SQL aggregates/window functions through ExecuteQuery
HealthCheck ✅ implemented —
GetServerInfo ✅ implemented supported_features, statistics and the database list
GetMetrics ✅ implemented —

An unimplemented RPC answers gRPC UNIMPLEMENTED with the method name — it never silently returns an empty result, so a client can branch on it.

Optional packages

Package Over gRPC Over SQL Caveat
SharpCoreDB.Analytics local-only aggregates/window functions (AVG, STDDEV, PERCENTILE, ROW_NUMBER, …) ExecuteAnalytics is UNIMPLEMENTED; the SQL surface covers the same functions
SharpCoreDB.VectorSearch VectorSearch RPC CREATE VECTOR INDEX + SQL single searches only (VectorSearchBatch is UNIMPLEMENTED)
SharpCoreDB.Graph local-only graph tables are SELECT-able GraphTraverse/GraphShortestPath are UNIMPLEMENTED
SharpCoreDB.Graph.Advanced local-only graph tables are SELECT-able community detection and centrality run in-process
SharpCoreDB.Search local-only full-text SQL (MATCH, full-text index) no dedicated RPC
SharpCoreDB.HybridSearch local-only (vector leg via VectorSearch) the vector leg through SQL fusion/routing options are not exposed over gRPC
Time-series local-only the time-series tables are ordinary tables archival/tiering controls are in-process only

Advertised features

ConnectResponse.supported_features and ServerInfoResponse.supported_features both come from GrpcCapabilityContract.SupportedFeatures:

SQL, Transactions, VectorSearch, Schema, Monitoring, RBAC

A feature is only advertised when the matching RPC answers — that is what the contract test asserts, and it is why Analytics, Graph and PreparedStatements are not in the list.

Other protocols

Protocol Status
gRPC over HTTPS (HTTP/2, optional HTTP/3) flagship; the matrix above
Binary TCP handshake, query, non-query and DDL
REST (/api/v1/*) query, execute, batch, schema (#574), health, metrics, databases
WebSocket streaming query results
PostgreSQL wire catalog (pg_catalog, information_schema) and query forwarding

Keeping it honest

  1. Add or change an RPC → update GrpcCapabilityContract.Rpcs.
  2. Run GrpcCapabilityContractTests; it reflects over DatabaseServiceBase, so a proto RPC that is missing from the contract fails Contract_ListsEveryRpcTheProtoDeclares, and an RPC whose behaviour disagrees with its entry fails EveryRpc_BehavesAsTheContractSays.
  3. Update this page (the test does not compare it; a reviewer does).