Alysia matchmaking, transfers, scores, relay service
  • Rust 93.4%
  • Shell 4.5%
  • Dockerfile 1.7%
  • Just 0.4%
Find a file
Valentin LAMBOLEY-DEPOIRE 15c9471719
All checks were successful
CI / ci-freshness: vendored files match TEMPLATE_REV (push) Successful in 1s
CI / ci: lint, test, build (push) Successful in 2m45s
fix: ignore build context noise in the image build
2026-10-08 17:35:25 +02:00
.github/workflows feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
.sqlx feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
ci feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
services/game feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
.dockerignore fix: ignore build context noise in the image build 2026-10-08 17:35:25 +02:00
.gitignore feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
Cargo.lock feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
Cargo.toml feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
clippy.toml feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
deny.toml feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
Dockerfile feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
justfile feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
justfile.ci feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
README.md feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
rust-toolchain.toml feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00
rustfmt.toml feat: extract game service from the monorepo 2026-10-08 17:18:28 +02:00

alysia-game

The game service — registry, matchmaking, transfers, scores, push relay — extracted from the alysia monorepo (services/game at f4841ad5f308d0a3c997c863822b0b893fb1267c, moved byte-identical).

Today: owns the server_registry table (statically seeded with the lobby) and serves GET /v1/registry plus the heartbeat POST /v1/servers/heartbeat (liveness: upsert nonce + load + last_seen, 60 s expiry filtered at read time by the matchmaker), the queue (POST /v1/queue/join|leave), the 1 s-tick matchmaker (groups signups by mode, writes pending_transfers with expiry, publishes match.found), the pending transfers (GET /v1/transfers/pending, DELETE /v1/transfers/{player}), the generic scores sink (POST + GET /v1/scores), the push-relay poll (GET /events/poll backed by per-stream NATS pumps), plus the common surface every Alysia service exposes (healthz, ping, gRPC Pinger + grpc.health.v1). The durable JetStream stream (ALYSIA_GAME) is ensured at boot.

Layout

Path Role
services/game/ The service crate: src/ (router, registry, queue, matchmaker, transfers, scores, relay, binary), migrations/ (registry, scores, liveness, queue, public endpoint, pending transfers + expiry), tests/ (container-backed integration + relay/matchmaker unit tests)
.sqlx/ Scoped offline query metadata: this service's queries only (regenerate with just sqlx-prepare)
Dockerfile Single-binary image (alysia/game), adapted from the monorepo's infra/services/Dockerfile
deny.toml cargo-deny allow list narrowed to this workspace's graph (no Pumpkin/Cedar chains)
justfile Consumer wrapper: import "justfile.ci" plus sqlx-prepare
justfile.ci, ci/ Vendored from alysia-ci-templates at TEMPLATE_REV — never patched locally

Commands

just ci-lint                         # fmt + clippy (-D warnings) + machete + deny
just --set test_args "" ci-test      # full test suite (container-backed, needs podman)
just --set image alysia/game ci-build   # local image alysia/game:local

Never push an image by hand: alysia/game:<sha> ships only through CI (main and tags). The shared crates (alysia-nats, alysia-proto, alysia-service, alysia-test) resolve as exact git deps on the versioned alysia-libs tag libs-v0.1.0 — no path deps across repos, no vendored copies.

Vendoring

  • Template updates: re-vendor justfile.ci + ci/ at the new tag, bump TEMPLATE_REV in .github/workflows/ci.yml (ci-freshness enforces the match).
  • Libs updates: bump the tag on the four alysia-* git deps in services/game/Cargo.toml, refresh Cargo.lock, re-run the gate.