Architecture

Architecture

Laredo is organized in three layers, each building on the one below.

Layer diagram

Core library github.com/zourzouvillys/laredo Engine (orchestrator) · SyncSource / SyncTarget · SnapshotStore / Serializer pipeline filters & transforms · TTL · dead-letter store EngineObserver (structured events) · readiness signaling Zero opinions on config, transport, or logging. Optional modules opt-in gRPC services (OAM · Query · Replication) · HOCON config loader · metrics bridges Pre-built service — laredo-server a binary HOCON config · gRPC server · metrics export · structured logging · signals · CLI

Core library

The laredo Go package defines all public interfaces and types. It has no external dependencies. Everything is pluggable:

  • Sources produce baseline snapshots and change streams
  • Targets consume rows and changes
  • Filters/transforms sit in the pipeline between source and target
  • Snapshot stores persist target state for fast restart
  • Observers receive structured events (no logging in core)

Engine

The engine is the orchestrator. It manages a set of pipelines, each binding a source table to a target. The engine handles:

  • Startup path selection (cold start, resume, or snapshot restore)
  • Baseline loading and change streaming
  • ACK coordination across targets sharing a source
  • Backpressure and buffering
  • Error isolation per pipeline
  • TTL/expiry scanning
  • Snapshot scheduling

Package layout

laredo.go, types.go, source.go, ...   Core interfaces (root package)
internal/engine/                       Engine implementation
source/{pg,kinesis,testsource}/        Source implementations
target/{httpsync,memory,fanout}/       Target implementations
snapshot/{local,s3,jsonl}/             Snapshot implementations
filter/, transform/                    Built-in pipeline components
service/{oam,query,replication}/       gRPC services
config/                                HOCON config loading
metrics/{prometheus,otel}/             Metrics bridges
client/fanout/                         Go fan-out client library
cmd/laredo-server/                     Pre-built service binary
cmd/laredo/                            CLI tool