jetstream v2 in zig stream.waow.tech
Zig 79%
Python 10%
4%
Go 3%
HTML 2%
Just <1%
Shell <1%
JavaScript <1%
Dockerfile <1%

README.md

stream #

a zig implementation of jetstream — the full-network archive and streaming service for atproto. built on zat.

A live instance runs at stream.waow.tech — Jetstream V2-compatible feeds with the whole network archived behind them (~23B events, ~16.3M repos, sealed segments back to seq 1), live-current with the relay. Consumer docs, including endpoints and cursor semantics, are at stream.waow.tech/llms.txt.

what it does #

  • live feeds: /subscribe (Jetstream v1-compatible JSON) and /subscribe-v2 (sequence cursors + record CBOR), with collection/DID filters, cursor replay, and zstd
  • the archive: listSegments, getSegment, getBlock, planBackfill — gap-free recovery over sealed jss segments byte-compatible with upstream. A working consumer (plan → fetch → decode → sqlite) is examples/backfill-collection-sqlite.py; best suited to dense collections and bulk drains (block-granular retrieval)
  • whole-network bootstrap with concurrent live capture, deterministic merge, and crash-safe resume
  • Sync 1.1 commit verification and continuing repair of repositories that were unavailable or changed during bootstrap
  • operations views at /status, Prometheus /metrics on the debug listener

The full implemented surface is in docs/feature-surface.md. Stream targets semantic parity with pinned Jetstream V2 commit f29815c; docs/semantic-parity.md is the authority on what is proved, row by row, and no claim here overrides it.

develop #

zig build test && zig build   # unit tests + exe
just simulator                # local fake atproto network on :7777
just run-sim                  # stream against it

Suites, oracles, and the power-loss tier: docs/testing.md. The build pins Zig and all native deps (RocksDB, zstd, xxHash, zlib) — no system libraries required.

docs #

semantic-parity.md the deployment gate — what is proved, row by row
architecture.md how the subsystems fit together
feature-surface.md the full implemented surface
invariants.md the rules that must never break, and what each cost
gotchas.md deliberate behavior that looks wrong; traps in the harness
configuration.md every runtime control and its default
deploying.md the routine ship-a-commit flow, stage costs, verification
deployment-runbook.md the whole-network experiment: staged plan and failure responses
testing.md suites, oracles, receipts
benchmarks.md subsystem benchmarks
experiment-6-handoff.md operating the live instance — runbooks
ingest-speedup-2026-08-06.md the 1.5 → 3,016 events/s ladder
full-network-experiment-2026-07.md field log of whole-network runs

The rest of docs/ holds the port record: the jss format byte spec and seal spec, upstream bootstrap/compaction/subscribe condensations where every deliberate divergence is written down, the live scheduler and repair notes, lessons carried over from zlay, and durable product/copy context for public surfaces.