Skip to main content

v0.2.0

Released March 4, 2026. Full Changelog

24 commits since v0.1.2. Major release adding cloud replication, journal recording, embeddable core, and the values endpoint.

Highlights

Cloud Replication

Full boat-to-cloud data replication over gRPC with mTLS (lplex-cloud binary). Three RPCs: unary Handshake, bidirectional Live stream (realtime frames), bidirectional Backfill stream (raw journal blocks). Live-first design: frames flow immediately on connect, backfill runs concurrently.

  • ReplicationClient on the boat side with reconnect loop and exponential backoff
  • ReplicationServer with InstanceManager for multi-tenant cloud
  • Lazy Broker per instance (~3MB RAM + 2 goroutines, started on demand)
  • Hole tracking for gap detection and backfill
  • Replication event log for diagnostics (GET /instances/{id}/replication/events)
  • Single-port ACME mode for TLS termination

Journal Recording

Binary journal format (.lpj) for persistent frame storage with block-level zstd compression (~4x ratio at 256KB blocks).

  • JournalWriter with configurable rotation by duration and size
  • Block index at EOF for O(1) offset lookup
  • Device table tracking per block (with product info)
  • Journal v2 format with BaseSeq for sequence-based seeking

Journal Retention & Archival

JournalKeeper with three-knob retention (max-age, min-keep, max-size) and soft/hard threshold system.

  • Archive support via user-provided script (JSONL stdin/stdout protocol)
  • .archived sidecar markers
  • Retry with exponential backoff (1min to 1h cap)
  • Overflow policy: delete-unarchived or pause-recording

Embeddable Core

lplex core is now a public Go package. External services can embed Broker, Consumer, JournalWriter, and all other components directly.

  • Pull-based Consumer model with tiered replay (journal -> ring buffer -> live)
  • Consumer.Next(ctx) for at-your-own-pace iteration
  • ErrFallenBehind when data is unavailable

Values Endpoint

GET /values returns last-seen frame per (source, PGN) pair with device resolution. Filter support via query params.

HOCON Configuration

Config file support (lplex-server.conf, lplex-cloud.conf) using HOCON format. CLI flags always override config values.

TypeScript Client

TypeScript client library (later moved to its own repo).

Bug Fixes

  • Fix DeviceTableOffset uint16 overflow in journal block trailer
  • Fix integer overflow in uintSlice flag parsing
  • Fix cloud SSE endpoint returning 404
  • Fix replication client TLS: use system roots for server cert verification
  • Fix cloud health check failing on ACME single-port mode
  • Harden journal reader against malformed compressed metadata

Other

  • CORS support for all origins
  • Block-level zstd compression for journal
  • Docker build fix: use pre-built binary instead of source build