Skip to content

Connectivity Overview

ParticleDB currently exposes four live server protocols: PostgreSQL wire, gRPC, HTTP, and Redis RESP. The repo also includes WebSocket protocol definitions, but the default server path today is HTTP SSE streaming rather than a production WebSocket upgrade endpoint.

ProtocolDefault PortUse CaseClient Libraries
PostgreSQL Wire5432SQL queries, transactions, prepared statements, pipeline modeAny PostgreSQL driver
gRPC26257Typed SQL RPCs, batch execution, bulk insert, CDC, healthgrpcurl, generated stubs
HTTP API8080JSON SQL, KV helpers, health, status pagecurl, fetch, any HTTP client
Redis RESP6379Key-value and Redis-style data structuresAny Redis client
SSE SQL streaming8080Incremental SQL results over HTTPcurl -N, browser EventSource, fetch-based clients
Terminal window
psql -h localhost -p 5432 -U particledb -d particledb
Terminal window
grpcurl -plaintext \
-import-path proto \
-proto proto/particledb.proto \
-d '{}' \
localhost:26257 \
particledb.v1.ParticleDB/Health
Terminal window
curl http://localhost:8080/health
curl -X POST http://localhost:8080/v1/sql \
-H "Content-Type: application/json" \
-d '{"sql":"SELECT COUNT(*) AS total FROM products"}'
Terminal window
redis-cli -p 6379
> SET user:1001 '{"name":"Alice"}'
> GET user:1001
ProtocolCLI FlagConfig KeyEnv Variable
PG Wire--pg-addrnetwork.pg_addrPDB_PG_ADDR
PG Unix Socket--pg-unix-socketnetwork.pg_unix_pathPDB_PG_UNIX_PATH
HTTP--http-addrnetwork.http_addrPDB_HTTP_ADDR
gRPC--grpc-addrnetwork.grpc_addrPDB_GRPC_ADDR
Redis(config/env only)network.redis_portPDB_REDIS_PORT
Metrics--metrics-portnetwork.metrics_portPDB_METRICS_PORT
Health--health-portnetwork.health_portPDB_HEALTH_PORT

See Configuration for the full reference.

PG wire, gRPC, and Redis support direct TLS from the server. The built-in HTTP server is plain HTTP today, so use a reverse proxy or ingress if you need HTTPS or request-layer auth for /v1/*.

ProtocolTLSAuth
PG WireYestrust, password, md5
gRPCYesAuthorization: Bearer <username>:<password> when auth is enabled
HTTPVia reverse proxyFront with your normal proxy/gateway if needed
Redis RESPYesAUTH
SSE SQL streamingVia reverse proxySame as the HTTP server
  • Applications and ORMs — Use PostgreSQL Wire.
  • Generated clients, CDC, and typed RPCs — Use gRPC.
  • Simple curl/fetch integrations — Use the HTTP API.
  • Redis-style caching/data structures — Use Redis RESP.
  • Incremental result delivery over HTTP — Use /v1/sql/stream today.