Work in Progress: This page is under development. Use the feedback button on the bottom right to help us improve it.

System Components

Laminar consists of several core components that work together to process streaming data in real-time.

Component Overview


API Server

The API Server is the control plane for Laminar, handling all management operations.

Responsibilities

FunctionDescription
Connection ProfilesManage credentials and connection settings for sources and sinks
Table DefinitionsStore schemas and table configurations
Pipeline ManagementCreate, update, start, stop, and delete pipelines
Schema RegistryHandle schema inference and validation
Health MonitoringTrack pipeline status and health metrics

API Endpoints

The API server exposes RESTful endpoints:

POST   /api/v1/connection-profiles    # Create connection profile
GET    /api/v1/connection-profiles    # List connection profiles
POST   /api/v1/tables                 # Create table
GET    /api/v1/tables                 # List tables
POST   /api/v1/pipelines              # Create pipeline
GET    /api/v1/pipelines              # List pipelines
POST   /api/v1/pipelines/:id/start    # Start pipeline
POST   /api/v1/pipelines/:id/stop     # Stop pipeline

Stream Engine

The Stream Engine is the data plane, responsible for executing SQL transformations on streaming data.

Components

ComponentDescription
CoordinatorManages pipeline lifecycle, distributes work, handles checkpointing
WorkersExecute SQL operators, process data partitions in parallel
OperatorsIndividual SQL operations (filter, project, aggregate, join)

Execution Model

  1. Pipeline Compilation: SQL is parsed and compiled into a directed acyclic graph (DAG) of operators
  2. Partition Assignment: Input partitions are distributed across workers
  3. Data Processing: Each worker processes its assigned partitions independently
  4. Checkpointing: Periodic snapshots ensure exactly-once processing

State Store

The State Store manages intermediate state required for stateful operations like aggregations, joins, and windowing.

State Types

TypeStorageUse Case
In-Memory StateMemoryActive windows, aggregations, and joins
Checkpointed StateParquet on Object StorageDurable state for recovery

State Tables

Table TypeDescription
GlobalKeyedTableKey-value store for aggregations
ExpiringTimeKeyTableTime-indexed store with TTL for windowed operations

Metadata Store

The Metadata Store persists all configuration and runtime state using PostgreSQL.

Stored Entities

EntityDescription
Connection ProfilesSource and sink connection configurations
TablesSchema definitions and table metadata
PipelinesPipeline configurations and SQL queries
CheckpointsCheckpoint metadata and state references
JobsPipeline execution history and status

Component Interaction

This diagram shows how components interact during pipeline execution:

Startup Sequence

  1. Client sends start request to API Server
  2. API Server loads pipeline configuration from Metadata Store
  3. Stream Engine initializes workers and operators
  4. Workers connect to sources and begin consuming
  5. Transformed data flows to configured sinks
  6. Checkpoints are periodically written to State Store

Deployment Topology

In production deployments:

  • API Server: Runs as a stateless deployment with multiple replicas
  • Stream Engine: Runs as pods with resource requests/limits
  • PostgreSQL: Deployed as a StatefulSet or managed service
  • Object Storage: S3 or compatible storage for checkpoints