Real-Time

Real-Time Subscriptions at Scale

Push subscriptions, reconnection replay, server-side WASM reducers, custom entity types, and zero-config authentication. Build reactive applications on temporal data.

Hierarchical Temporal Multiplexing

Push Subscriptions

Subscribe to entities or entity types and receive push events over WebSocket. No polling, no message queues, no external infrastructure.

Per-Entity
Watch specific entities
Subscribe to a specific entity by ID and receive events whenever new vectors are ingested, segments are finalized, or anomalies are detected. Ideal for dashboards, alerting, and real-time monitoring of critical assets.
  • New vector ingestion events
  • Segment finalization (regime change) events
  • Anomaly detection alerts
  • Entity deletion notifications
Per-Type
Watch entire entity classes
Subscribe to an entity type (e.g., all SensorReading entities) and receive events from every entity of that type. Perfect for fleet-wide monitoring, population analytics, and cross-entity pattern detection.
  • Fleet-wide event streaming
  • Multiple subscriptions per connection
  • Server-side event filtering
  • JSON event format with metadata

Reconnection Protocol

Network disconnections are inevitable. VectorScaleDB maintains a server-side replay buffer so clients never miss events, even after extended outages.

Replay Buffer
Server-side event retention
The server retains recent events in a bounded replay buffer. When a client reconnects, it provides its last-seen sequence number and receives all events that occurred during the disconnection. No client-side state management required.
  • Configurable buffer capacity (default: 10,000 events)
  • Automatic sequence numbering per subscription
  • Efficient binary replay for large catch-ups
  • Zero duplicate events via sequence tracking
Overflow Handling
Graceful degradation
If a client is disconnected longer than the replay buffer covers, the server sends a RESET notification indicating the gap. The client can then perform a full state sync via REST API before resuming the subscription. No silent data loss — the client always knows its state.
  • Explicit RESET signal on buffer overflow
  • Client-driven full sync after extended outage
  • Subscription state preserved across reconnections
  • No silent gaps in event streams

WASM Reducers

Deploy custom server-side logic as WebAssembly modules. Transform, filter, or aggregate data at the database level — no round trips to application servers.

Server-Side Logic
Code at the data layer
Upload WASM modules that execute inside VectorScaleDB. Reducers run on ingested vectors before storage, enabling custom validation, transformation, enrichment, and derived calculations without external services.
Sandboxed Execution
Safe and metered
WASM reducers execute in a sandboxed runtime with fuel metering. Set compute budgets per reducer to prevent runaway execution. Reducers cannot access the filesystem, network, or other tenants' data.
Hot Reload
Deploy without downtime
Update reducer logic by uploading a new WASM module. The new version takes effect immediately for subsequent ingestions. No server restart, no connection interruption, no deployment pipeline.
API
Reducer management endpoints
Upload, list, update, and delete WASM reducers via the REST API. Each reducer is associated with an entity type and executes on every ingest for that type.
# Upload a WASM reducer for SensorReading entities
curl -X POST https://api.vectorscaledb.com/v1/reducers \
  -H "Content-Type: application/wasm" \
  -H "X-Reducer-Name: validate-temperature" \
  -H "X-Entity-Type: SensorReading" \
  -H "X-Fuel-Limit: 100000" \
  --data-binary @validate_temperature.wasm

# List active reducers
curl https://api.vectorscaledb.com/v1/reducers

# Delete a reducer
curl -X DELETE https://api.vectorscaledb.com/v1/reducers/validate-temperature

Custom Entity Types

Go beyond the 200+ built-in entity types. Define custom types at runtime via the REST API — no schema migrations, no server restarts.

Runtime Definition
Create types via API
Define new entity types with a name and optional metadata. Custom types participate in all VectorScaleDB features: compression, indexing, subscriptions, cross-domain queries, and anomaly detection. They are first-class citizens of the system.
  • POST /v1/entity-types — register a custom type
  • GET /v1/entity-types — list all types (built-in + custom)
  • Adaptive compression thresholds auto-tune per type
  • Full query compatibility with built-in types
Flexibility
Your domain, your types
Model any domain with purpose-built entity types. Custom types are especially useful for niche verticals, research applications, and multi-tenant deployments where different tenants track different kinds of entities.
  • No schema migration or deployment required
  • Types persist across server restarts
  • Cross-type queries work with custom types
  • MCP tools support custom types automatically

Auto-Identity Authentication

Zero-configuration authentication for development and edge deployments. Devices authenticate by presenting their identity — no token provisioning, no certificate management.

How It Works
Identity-based access
In auto-identity mode, clients authenticate by declaring their entity ID. The server creates a session scoped to that identity, allowing the client to ingest data and subscribe to events for its own entities. Ideal for IoT devices, game clients, and development environments.
Production Auth
Full auth when you need it
Auto-identity is one authentication mode alongside JWT tokens, API keys, and platform-managed tenant authentication. Start with auto-identity during development, switch to JWT or API keys for production. The application code does not change — only the server configuration.

SDK & Integration Support

Client libraries, AI agent integration, and OpenAPI specification for code generation in any language.

Python SDK
Native Python bindings
PyO3-based Python package with type hints. Ingest vectors, run queries, and manage subscriptions from Python. Install via pip, compatible with NumPy arrays for zero-copy vector ingestion.
MCP Server
AI agent integration
Model Context Protocol server with 30+ tools for AI agent integration. Connect Claude, GPT, or any MCP-compatible agent directly to VectorScaleDB for autonomous data exploration and analysis.
OpenAPI
Code generation for any language
Full OpenAPI 3.0 specification exported from the running server. Generate TypeScript, Go, C#, Java, or any language client from the spec. Interactive Swagger UI available for API exploration.

Related API Endpoints

Key endpoints for the real-time platform.

Related Capabilities

Build reactive applications on temporal data

See real-time subscriptions and WASM reducers in action.