Athena

Athena Driver Crate

What belongs in crates/athena-driver today and what still remains in athena_rs for the remaining runtime-coupled follow-ups.

crates/athena-driver is the backend-driver seam for Athena. The current slices cover the Scylla backend, shared host-health tracking, the health-aware Supabase client core, the first portable PostgreSQL helper modules, and the Cloudflare D1 proxy/client layer.

What Lives Here Today

  • Scylla connection metadata parsing from client metadata payloads.
  • Scylla session opening and CQL execution against explicit connection targets.
  • Shared host-health tracking and circuit-breaker helpers used by Scylla and Supabase.
  • Health-aware Supabase client types and query-builder wrappers.
  • PostgreSQL SQL classification/execution helpers.
  • PostgreSQL schema-cache helpers, column-resolution helpers, and JSON row-expression builders.
  • Cloudflare D1 metadata parsing, proxy request execution, session/bookmark headers, and bounded write-retry helpers.

What Still Stays In athena_rs

  • PostgreSQL driver registry, deadpool runtime, and high-level CRUD code that still depends on Athena runtime pool management.
  • Config-driven Scylla convenience loaders that turn Athena config into a connection target.
  • Higher-level Supabase routing helpers in src/drivers/supabase/mod.rs.
  • Athena gateway, SDK, and catalog-resolution layers that call into the extracted D1 driver primitive.

Current Extraction Rule

Use athena-driver when code is about backend-specific connection behavior, backend health tracking, or direct backend execution primitives.

Keep code in athena_rs when it still needs:

  • Athena config loading or repo-local bootstrap state
  • PostgreSQL query-builder and connection-pooler coupling
  • broader gateway or API orchestration

Near-Term Direction

The next driver pass should finish the PostgreSQL side by moving the pool, registry, deadpool, and CRUD execution surfaces once their remaining runtime couplings are trimmed down.