Athena

Athena WSS Crate

What belongs in crates/athena-wss and what still stays in athena_rs after the websocket extraction.

crates/athena-wss is the websocket transport seam for Athena. It owns the CDC websocket server, event replay/broadcast pipeline, and the /wss/info gateway contract helpers that describe the WebSocket request/response surface.

What Lives Here Today

  • CDC websocket server startup and Axum route registration.
  • Websocket connection lifecycle, subscription handling, and travel replay.
  • Buffered event broadcast, replay cache, and JSONL event log helpers.
  • /wss/info request/response contract types and Actix handler export.

What Still Stays In athena_rs

  • CLI wiring for --cdc-only and binary startup decisions.
  • Main API route registration and bundled openapi-wss.yaml hosting.
  • Feature re-exports that preserve the existing athena_rs::cdc::websocket and athena_rs::wss public paths.

Current Extraction Rule

Use athena-wss when code is about websocket transport, event replay, or the documented WSS contract surface.

Keep code in athena_rs when it needs:

  • binary bootstrap and CLI argument handling
  • cross-feature API registration in the main server
  • repo-root bundled assets such as openapi-wss.yaml

Near-Term Direction

The next realtime extraction boundaries should keep following this split:

  1. Keep replay and websocket transport in athena-wss.
  2. Keep portable CDC mutation replay logic in athena-cdc.
  3. Move backend-specific execution into the later athena-driver crate.