The big picture: Fairplay as one system
Before any single technology, you need the map. Interviewers almost always open with "walk me through your project". This module gives you a clear mental model of how the three projects work together, the contracts between them, and pitches you can deliver at three lengths.
By the end you can answer
- "Walk me through your project." (in 30 seconds, 2 minutes or 5 minutes)
- "How do the three services communicate, and why that way?"
- "What happens, step by step, when a cheater starts cheating?"
- "Why three services instead of one application?"
- "What stops the system from banning an innocent player?"
- "Which ideas did you repeat across all three projects, and why?"
1. The story in plain words
Fairplay is an anti-cheat platform for an imaginary competitive online shooter. Cheaters use software such as aimbots (the gun aims itself, so reactions are impossibly fast and almost every hit is a headshot) or speedhacks (the character moves faster than the game allows). The platform must catch them quickly without banning honest players who are simply very good.
The work is split into three programs, each in its own repository:
| Arena (Project 1) | Telemetry (Project 2) | Judge (Project 3) | |
|---|---|---|---|
| Role | The source of truth: accounts, matches, ratings, leaderboard, moderation history, appeals | The eyes: watches raw gameplay events in real time and raises flags | The investigator: reviews each flag and recommends a verdict |
| Shape | REST API (18 endpoints), request/response | Streaming pipeline: simulator, 3 detector replicas, verifier | Kafka consumer that calls an LLM, plus an evaluation command-line tool |
| Core tech | Spring Boot 4.1, Spring MVC, Spring Security (JWT), JPA, PostgreSQL 17, Redis 7, Flyway | Kafka 4.2 (KRaft), Kafka Streams, Spring Kafka, Micrometer, Grafana | Anthropic Java SDK (Claude), Resilience4j, Spring Kafka, WireMock |
| Big idea | Rules enforced in layers: a pure state machine, a database trigger, a confidence floor | Exactly-once processing, proved per player with sequence numbers | "The model recommends, code acts": a pure policy turns the verdict into one action |
| Headline number | Redis rank lookup p95 63.5 ms vs PostgreSQL 18.0 s on 1M players (measured) | ~24,900 events/s, 100% recall, 0.11% false positives, 0 lost or duplicated (measured) | 20 of 20 flags judged through an injected outage (measured). Quality numbers are not yet measured |
Arena is the league office. It keeps the official register of players, every match result, the league table and the disciplinary record, and only it can suspend a player. Telemetry is the set of cameras and sensors on the pitch. It sees every movement live and raises a hand when something looks wrong, but it cannot punish anyone. Judge is the video-review referee. It looks at the flagged incident, checks the player's history, and makes a recommendation. A rulebook clerk (the decision policy, plain code) turns that recommendation into exactly one official action, and anything doubtful goes to the human disciplinary panel (the moderators). Banned players can appeal.
2. The architecture on one screen
┌──────────────────────┐ match-events (~25,000 events/s, key = playerId, 6 partitions)
│ Simulator (P2) │─────────────────────────────────────────────────┐
│ 1,000 seeded players │ player-profiles (compacted) │
│ 5% cheaters │──────────────────────────────────────────────┐ │
└──────────┬───────────┘ ▼ ▼
│ match-summaries ┌──────────────────────────────────┐
▼ │ Detector (P2) × 3 replicas │
┌──────────────────────┐ │ Kafka Streams, exactly_once_v2 │
│ Arena bridge (P2) │ │ parse → windows → join → cooldown │
│ @KafkaListener │ └────────────────┬─────────────────┘
└──────────┬───────────┘ │ suspicious-players
│ POST /api/v1/matches ▼
│ (idempotent on externalId) ┌──────────────────────────────────┐
▼ │ Judge (P3) │
┌───────────────────────────────────────┐ GET x4 │ pre-checks → Haiku → (Sonnet) │
│ Arena (P1) Spring Boot REST + JWT │<───────────│ → DecisionPolicy (plain code) │
│ PostgreSQL = truth, Redis = ranks │<───────────│ one moderation action │
│ append-only moderation log │ POST └────────────────┬─────────────────┘
└───────────────────────────────────────┘ │
▼ judge-verdicts (compacted)
Two kinds of arrows matter:
- Kafka topics (asynchronous). The simulator writes events; the detector writes flags; the Judge reads them. Producers and consumers do not wait for each other and do not even need to be running at the same time.
- HTTP calls (synchronous). The bridge posts finished matches to Arena; the Judge reads player data from Arena and posts moderation actions. The caller waits for the answer, because it needs it (the action's result, or the data to reason about).
Who calls whom
| Caller | Callee | How | Sync? | Authentication |
|---|---|---|---|---|
| Simulator | Arena | POST /auth/register for 1,000 players (virtual threads, at most 16 at once), POST /auth/login | Sync | Logs in as service account telemetry-sim |
| Simulator | Detector | Kafka topics match-events, player-profiles | Async | None (local broker) |
| Bridge (inside the detector app) | Arena | POST /api/v1/matches per finished match | Sync | JWT of telemetry-sim (role SERVICE) |
| Detector | Judge | Kafka topic suspicious-players | Async | Consumers read with isolation.level=read_committed |
| Judge | Arena | 4 read-only tools (GET /players/{id}, /players/{id}/matches, /moderation/players/{id}/history) and POST /moderation/players/{id}/actions | Sync | JWT of judge-agent (role SERVICE) |
| Judge | Claude API | Messages API over HTTPS via the Anthropic Java SDK | Sync | API key from ANTHROPIC_API_KEY |
Use a queue/log (Kafka) when the producer should not care who consumes, when volume is high, when the consumer may be slow or down (the Judge takes seconds per flag because it calls an LLM, while the detector produces flags in milliseconds), and when you want to replay. Use synchronous HTTP when the caller needs the answer right now to continue: the Judge cannot reason without the player's history, and it must know whether Arena accepted the action before it records a verdict.
3. One cheater, from the first shot to the ban
This is the single most valuable thing to be able to tell fluently. Practise it with your finger on the diagram above.
- Setup. The simulator (seeded with 42, so the same players and cheaters every time) registers its 1,000 players through Arena's API and remembers Arena's UUIDs. It publishes each player's profile (username, skill tier) to the compacted
player-profilestopic, and the secret list of who really cheats tocheater-ground-truth, a topic the detector is forbidden to read (a test enforces that). - Events. Four shard threads play 10-player matches, 20 ticks per second. Every shot, movement sample and kill becomes a JSON
MatchEventwith a per-player sequence numberseq(1, 2, 3, ...). Each event goes tomatch-eventswith the player id as the key, so all of one player's events land in the same partition, in order. Rate: about 25,000 events per second. - The cheat starts. Between 10 and 60 seconds into the run, player X's aimbot switches on: reaction times drop to about 60 ms and headshot rate climbs.
- Parse. One of three detector instances owns X's partition. It reads raw bytes and parses them inside the topology; bad bytes go to
match-events.DLTinstead of crashing the stream. - Window. X's SHOT events are aggregated in 5-second hopping windows that start every second. As soon as one window holds at least 12 hits, an average reaction of 140 ms or less and a headshot rate of at least 0.62, the aimbot rule fires and computes a score between 0.5 and 1.0.
- Enrich and de-duplicate. The flag is repartitioned by player, joined with X's profile from the
player-profilestable (to add username and tier), and passed through a 10-minute cooldown so X is not flagged every second. - Publish. The
SuspiciousPlayerflag is written tosuspicious-playersinside a Kafka transaction (exactly-once). Median time from cheat start to flag in the measured run: 3.9 s for obvious aimbots. - Pre-checks. The Judge reads the flag. It asks Arena for X's profile: is X unknown? already banned? judged in the last 30 minutes? Any of those means "skip", at zero LLM cost.
- Investigate. Claude Haiku gets the flag plus four read-only tools. It calls, for example,
get_player_profile,get_stat_percentilesandget_moderation_history, then returns a JSON verdict:BAN, cheat typeAIMBOT, confidence 0.95, three evidence items. - Escalate if needed. If Haiku was unsure (certainty under 0.85), failed, proposed banning a top-tier (PLATINUM or PRO) player, or offered fewer than 2 evidence items for a ban, Claude Sonnet re-investigates in a fresh conversation. Tool results are cached, so Arena is read only once per flag.
- Decide in code.
DecisionPolicy, a pure function, maps the final verdict to exactly one Arena action. ABANwith confidence of at least 0.90 and no request for human review becomesBAN; any otherBANbecomesFLAGplus human review. - Arena enforces its own rules.
POST /moderation/players/X/actionswithsource: JUDGE. Arena checks the JWT role (SERVICE), refuses a serviceBANbelow 0.80 confidence, runs the account state machine (ACTIVE → BANNED is allowed), inserts a row in the append-onlymoderation_actionstable and commits. After the commit, an event removes X from the Redis leaderboard. - Record the verdict. Only after Arena accepted the action does the Judge publish a verdict record to the compacted
judge-verdictstopic. That topic is the Judge's only state: on restart it is replayed so no flag is judged twice. - Aftermath. Future matches that include X are rejected by Arena with
422 PLAYER_NOT_ELIGIBLEand land in the bridge's dead-letter topic (expected behaviour). X mayPOST /appeals. A moderator decides; if overturned, X becomesREINSTATEDand goes back on the leaderboard.
Every hop above is implemented and tested, but the full chain has not been run live with all three projects together yet. Telemetry's bridge and registrar were tested against a stub Arena (StubArenaServer), and its measured run had Arena integration off (ARENA_ENABLED=false). The Judge's calls to Arena and to Claude were tested against a WireMock container, and it has never run with a real API key. So describe this as "the designed end-to-end flow, tested hop by hop". The Judge README's "Run the whole system" section lists the exact order for the first live run.
Each step maps to code you can open: steps 1–2 telemetry-simulator/.../engine/SimulationEngine.java and ShardWorker.java; steps 4–7 telemetry-detector/.../topology/TelemetryTopology.java; step 8 judge-service/.../arena/PreChecks.java; steps 9–10 judge-core/.../agent/AgentLoop.java and routing/ModelRouter.java; step 11 judge-core/.../policy/DecisionPolicy.java; step 12 arena/.../moderation/ModerationService.java, AccountStateMachine.java, V2__audit_log_append_only.sql, leaderboard/LeaderboardSync.java; step 13 judge-service/.../kafka/FlagListener.java and ProcessedFlagsLoader.java.
4. Contracts: the promises between services
A contract is anything another program depends on: an endpoint path, a JSON field name, an enum value, a topic name, an error code. All three projects treat these as frozen: their specifications say "don't rename them", and the code follows that.
| Contract | Owner | Used by | What would break if it changed |
|---|---|---|---|
Arena's 18 REST endpoints under /api/v1, JSON fields, error codes | Arena | Simulator, bridge, Judge | The bridge would dead-letter every match; the Judge's tools would fail |
suspicious-players topic and the SuspiciousPlayer record (flagId, playerId, username, skillTier, rule, score, windowStart, windowEnd, detectedAt, evidence, detectorVersion) | Telemetry | Judge, verifier | The Judge would dead-letter every flag as malformed |
match-summaries records, shaped exactly like Arena's RecordMatchRequest | Telemetry | Bridge to Arena | Arena would answer 400 for every match |
Service accounts telemetry-sim and judge-agent, role SERVICE, action sources TELEMETRY / JUDGE | Arena | Telemetry, Judge | 401/403 on every call, or INVALID_SOURCE |
Confidence floor: a service BAN needs confidence ≥ 0.80 | Arena | Judge | 422 CONFIDENCE_REQUIRED / CONFIDENCE_TOO_LOW |
read_committed
The detector writes inside Kafka transactions. A consumer with the default read_uncommitted could see records from a transaction that later aborts (for example, when an instance is killed). read_committed makes the Judge and verifier see only committed records. Module 09 explains exactly how.
5. Defence in depth: why an innocent player is hard to ban
The most important non-functional requirement is "do not ban honest players". Instead of trusting one component, the design stacks independent safeguards in different codebases:
| Layer | Where | What it does |
|---|---|---|
| 1. Conservative thresholds | Detector | A flag needs several conditions at once (12+ hits and fast reactions and a high headshot rate). Measured false-positive rate: 0.11% (1 PRO player of 950 honest players). |
| 2. Free pre-checks | Judge | Skip unknown, already banned or recently judged players before spending tokens. |
| 3. Second opinion | Judge | Unsure verdicts, top-tier bans and thin evidence go to a stronger model in a fresh conversation, so it cannot just agree with the first answer. |
| 4. The model only recommends | Judge | DecisionPolicy (plain code) decides. Auto-ban needs confidence ≥ 0.90 and no request for human review; everything else goes to a human. |
| 5. Tool guard | Judge | Tools are read-only and can only query the flagged player. A prompt injection cannot make the model call another URL or read another player. |
| 6. Server-side floor | Arena | Refuses any service BAN below 0.80, whatever the Judge does. A second line of defence in a different codebase. |
| 7. State machine | Arena | Only legal transitions (35 action/status pairs, exhaustively tested). |
| 8. Tamper-proof history | Arena (database) | A PostgreSQL trigger rejects UPDATE and DELETE on moderation_actions, so not even an application bug can rewrite history. |
| 9. Appeals | Arena | A banned player can appeal, and a human moderator decides. |
"I didn't want any single component to be able to ban someone on its own. The detector only flags, the model only recommends, a pure policy function decides, and Arena independently re-checks the confidence and the state transition. Even if all of that went wrong, the audit log can't be edited and the player can appeal."
6. Ideas you repeated in all three projects
Interviewers love patterns, because they show judgement rather than luck. These appear everywhere:
Pure core, framework at the edge
AccountStateMachine, RatingCalculator, TelemetryTopology, DetectionRules and all of judge-core have no Spring dependency. They are tested quickly and exhaustively; Spring only wires them.
An injected Clock
Never Instant.now() directly. Tests pass a fixed or mutable clock, so time-based logic (token expiry, cooldowns, windows, latency) is deterministic.
Idempotency everywhere
Arena's match externalId, the Judge's flagId check against replayed verdicts, compacted topics keyed by id. Retries become safe.
Records for data
DTOs, events, flags, verdicts and settings are immutable Java records, often validating themselves in the compact constructor.
Errors as data
Arena returns ProblemDetail with a stable code; Telemetry turns bad records into dead letters; the Judge returns tool errors to the model as results, not exceptions.
Real dependencies in tests
Testcontainers starts real PostgreSQL, Redis and Kafka. WireMock (as a container) impersonates Claude and Arena. Only the live Claude call is never made in tests.
Coverage gates
JaCoCo fails the build below 85% line coverage (per module in the multi-module builds).
Honest measurement
Each README reports measured numbers with the machine and method, including the targets that were missed.
Decisions written down
Where the code departs from the written spec, a // DECISION: comment says what and why. Those are great interview stories (module 15).
7. Why three services, and when that would be wrong
A good engineer can argue both sides. The reasons for splitting:
- Different workloads. Arena is request/response with database transactions. Telemetry is a high-throughput stream that scales by partitions. The Judge is slow (seconds per flag), expensive (tokens) and rate-limited by an external API. One process would force one scaling strategy on all three.
- Failure isolation. If the Claude API is down, gameplay and detection carry on; flags simply wait in Kafka. If Arena is down, the Judge holds the flag and retries without losing it.
- Independent change. A new prompt version or a new detection rule does not redeploy the game backend.
- Clear ownership of truth. Only Arena writes player status. Others ask Arena to change it, through a validated API.
The costs, which you should name before the interviewer does:
- Network calls fail in ways method calls do not (timeouts, partial failures), which is why so much of module 12 exists.
- No single transaction spans services. The Judge writes to Arena and then to Kafka; if it crashes in between, the flag is judged again. That is acceptable because the second attempt is safe (pre-checks see
BANNED, or Arena answers 409), and the worst case is a duplicatedNOTE. - More to run and monitor: three Compose stacks, several dashboards.
"For a real product with one small team I would probably start as a modular monolith and split out the streaming part first, because its scaling needs are so different. I split all three here on purpose, because each one demonstrates a different skill set, and because the boundaries are natural ones: the source of truth, the real-time pipeline and the slow, expensive AI step."
8. Your pitches
Learn these as a skeleton, not word for word. Put them in your own voice.
The 30-second version
"I built Fairplay, an anti-cheat platform for a competitive shooter, as three Java 21 and Spring Boot services. Arena is the REST backend and source of truth, with PostgreSQL, a Redis leaderboard and an append-only moderation log. Telemetry streams about 25,000 gameplay events a second through Kafka Streams and flags cheaters within seconds, and I proved it loses and duplicates nothing by killing a node mid-run. Judge is an LLM agent on the Claude API that investigates each flag with read-only tools and recommends a verdict, but plain code decides the actual action, so the model can never ban anyone on its own."
The 2-minute version (add one decision and one number per project)
- Problem: catch cheaters fast without banning good players.
- Arena: "The interesting parts are consistency and safety. Ratings live in PostgreSQL, and a Redis sorted set serves rank lookups in O(log N). I only update Redis after the database commit, so a rolled-back transaction never leaks. On a million players, Redis gave a p95 of 63 ms against 18 seconds for the SQL count. Moderation goes through a pure state machine, and a database trigger makes the audit log append-only."
- Telemetry: "Five-second hopping windows in Kafka Streams detect aimbots and speedhacks. Every event carries a per-player sequence number, so I can count duplicates and gaps per player. With exactly-once enabled I killed one of three instances mid-run, and all 7.4 million events were counted exactly once. Recall was 100% and the false-positive rate 0.11%."
- Judge: "Haiku investigates every flag with four tools; Sonnet re-investigates only uncertain or high-stakes cases, in a fresh conversation. The output is forced into a JSON schema and validated again in code, and a pure policy function picks the Arena action. Calls go through a rate limiter, a circuit breaker and a retry, and an outage holds flags instead of dropping them, which I tested with injected faults."
- Honesty line: "One target I missed was failover: 14 seconds against a 10-second goal, because Kafka Streams ran three rebalances back to back. The Judge's evaluation dataset needs an API key run that I haven't done yet, so I don't quote quality numbers for it. And each service is tested against real infrastructure or faithful stubs, but the first live run of all three together is still ahead of me."
The 5-minute version (a whiteboard walk)
Draw the diagram from section 2 while you talk. Spend about one minute per box, then one minute on trade-offs:
- Draw the simulator and topics. Explain keys and partitions (ordering per player), and why the simulator is seeded.
- Draw the detector. Explain the windows, the join with the profile table, the cooldown, and exactly-once with the sequence-number proof.
- Draw the Judge. Explain the agent loop, the tools, routing, caching, the policy table and the resilience stack.
- Draw Arena. Explain the source of truth, JWT roles, the state machine, ordered row locks for matches, and after-commit Redis sync.
- Trade-offs: service boundaries, at-least-once plus idempotency between services, what you would do next (an outbox table, Avro with a schema registry, faster failover, a real dataset run).
One-liners per project (when asked about just one)
| Project | One-liner |
|---|---|
| Arena | "A stateless Spring Boot REST backend with JWT auth where PostgreSQL is the source of truth, Redis serves O(log N) ranks, and moderation rules are enforced by a state machine, a confidence guardrail and an append-only database trigger." |
| Telemetry | "A Kafka Streams cheat detector processing about 25,000 events a second with exactly-once semantics, which I verified with per-player sequence numbers across a mid-run instance kill." |
| Judge | "A framework-free LLM agent in Java on the Claude API that investigates flags with guarded read-only tools, routes between a cheap and a strong model, and lets deterministic code, not the model, take the action." |
9. Interview questions
What does each of the three projects do, in one sentence each? Basic
Arena stores the truth (accounts, matches, leaderboard, moderation, appeals) behind a secured REST API. Telemetry detects cheating in real time from a stream of gameplay events and publishes flags to Kafka. Judge reads those flags, investigates each with an LLM and read-only tools, and applies exactly one moderation action in Arena through deterministic code.
How do the services communicate? Basic
Telemetry to Judge is asynchronous through the Kafka topic suspicious-players. Both Telemetry (the bridge and the simulator's registration) and the Judge talk to Arena synchronously over HTTP with JWT bearer tokens, logging in as service accounts with the SERVICE role. The Judge also calls the Claude Messages API over HTTPS.
Why Kafka between Telemetry and Judge, rather than the detector calling the Judge over HTTP? Intermediate
Three reasons. Speed mismatch: the detector produces a flag in milliseconds, while judging takes seconds and costs money, so a buffer absorbs bursts. Decoupling and durability: if the Judge is down or the Claude API is unavailable, flags wait safely in the topic and nothing upstream slows down or fails. Replay and fan-out: the verifier reads the same topic to score detection, and the evaluation harness collects its dataset from it. An HTTP call would couple the detector's availability to the Judge's.
Walk me through what happens when a cheater starts cheating. Intermediate
Use section 3. The short form: events keyed by player arrive on match-events; the detector's hopping window crosses the aimbot thresholds; the flag is joined with the player's profile, de-duplicated by a cooldown and written transactionally to suspicious-players. The Judge pre-checks the player in Arena, lets Haiku investigate with tools (escalating to Sonnet when needed), and a pure policy maps the verdict to one action. Arena checks the role, the confidence floor and the state machine, writes the append-only audit row, commits, and then removes the player from the Redis leaderboard. Finally the Judge records the verdict on a compacted topic.
What stops the LLM from banning an innocent player? Intermediate
The model never takes an action. Its JSON verdict is input to DecisionPolicy, a pure function: only a BAN with confidence ≥ 0.90 and needsHumanReview=false becomes a ban; everything uncertain becomes a flag for human review. Before that, uncertain or high-tier cases get a second opinion from a stronger model. Afterwards, Arena independently refuses service bans below 0.80 and enforces the state machine. And bans are appealable, with an immutable audit log. See section 5.
There is no distributed transaction between Arena and the Judge's Kafka topic. What happens if the Judge crashes after banning but before publishing the verdict? Deep
The flag's offset was not committed, so after restart the flag is delivered again (at-least-once). The Judge's pre-check reads the player from Arena, sees BANNED, and records a SKIPPED verdict without calling the model. If instead a moderator had acted in between, Arena answers 409 and the applier re-reads the status and runs the policy once more. The worst possible duplicate is a second NOTE in the audit trail, which is harmless. So the system gets the effect of exactly-once from at-least-once delivery plus idempotent, state-checked operations. This is the standard pattern when you cannot (or should not) use two-phase commit.
Why didn't you put everything in one Spring Boot application? Deep
See section 7: different scaling profiles, failure isolation and independent change, at the cost of network failures, no cross-service transaction and more operations work. Close with the mature answer: a modular monolith is often the right start, but these boundaries are natural ones.
Where is the source of truth for a player's status, and why does that matter? Intermediate
Arena's PostgreSQL players table. The Judge keeps no copy of status: it re-reads it before judging and again after a 409. Redis holds only a derived view (ratings for ranking) that can be rebuilt from PostgreSQL at any time. A single writer per fact avoids conflicting copies. Other services request changes through a validated API instead of writing data directly.
Which design idea do all three projects share that you're proudest of? Basic
Pick one and explain it with an example. A strong choice is "pure core, framework at the edge": the rules that matter (state machine, detection topology, decision policy) have no Spring dependency, so they are tested exhaustively and quickly. Example: AccountStateMachineTest checks all 35 action/status pairs; TopologyTestDriver tests run the whole detector at exact timestamps without a broker; the Judge's agent loop is tested with a scripted fake gateway.
What would break if Telemetry renamed the field skillTier in a flag? Curveball
The Judge deserialises flags with Jackson into its own SuspiciousPlayer record. Because unknown properties are ignored, the renamed field would be silently dropped and skillTier would be null. The flag would still parse, but the HIGH_TIER_BAN escalation rule could never fire, so a PRO player could be auto-banned on Haiku's verdict alone. That is a silent safety regression, which is exactly why field names are contracts. The real fix in industry is a schema registry with compatibility checks (Avro or Protobuf), which Telemetry's README lists as a next step.
Have you run all three projects together, end to end? Curveball
Answer truthfully and calmly: "Not yet as one live run. Each hop is implemented and tested: Telemetry's bridge and player registration against a stub Arena whose request shapes I checked against Arena's source code; the Judge against a WireMock container that impersonates both Claude and Arena, plus a real Kafka broker. Arena's API is tested with real PostgreSQL and Redis. The live run needs an Anthropic API key and all three stacks up at once; the order is documented (Arena, then Telemetry with ARENA_ENABLED=true, then the Judge, then the simulation), and it's my next step." Then offer to walk through any hop. If you do manage the live run before the interview, update this answer, which then becomes a strong story of its own.
Your Judge numbers say 96.6% precision. Is that real? Curveball
No, and you must say so immediately and calmly: "Those are illustrative targets I wrote into the README, clearly labelled as not measured. The evaluation harness is built and tested, but generating the labelled dataset needs a live API key and a special Telemetry run that I haven't done yet. The only measured result for the Judge is the fault-injection test: 20 of 20 flags judged through a 20-second outage with none dropped." Then explain how the evaluation would measure it (module 11). Interviewers respect this. Being caught bluffing ends interviews.
10. Quick quiz
1. Which component is allowed to change a player's status?
Arena is the single source of truth. The Judge asks Arena through POST /moderation/players/{id}/actions, and Arena still validates role, source, confidence and the state transition.
2. Why does the simulator use the player id as the Kafka key?
The default partitioner hashes the key, so the same key always maps to the same partition, and order is guaranteed within a partition. Windows per player depend on that.
3. The Judge crashes after Arena accepted a BAN but before the verdict was published. What happens?
At-least-once delivery plus idempotent, state-checked handling. Kafka cannot roll back an HTTP call to another service.
4. Which safeguard lives in a different codebase from the Judge?
Arena's ModerationService.enforceGuardrails refuses service bans below 0.80. It is independent of whatever the Judge does.
5. Which Judge number can you quote as measured?
Only the ResilienceIT fault-injection result is real. The rest are labelled "optimal imaginary values".
11. Cheat sheet
The system
- Arena = truth + REST + JWT + PostgreSQL + Redis ZSET + state machine + append-only audit.
- Telemetry = simulator (25k events/s) → Kafka → Kafka Streams detector ×3 (windows, join, cooldown, exactly-once) →
suspicious-players; verifier proves integrity. - Judge = Kafka consumer → pre-checks → Haiku (+ Sonnet) with 4 guarded tools → schema-checked verdict → pure
DecisionPolicy→ one Arena action → compactedjudge-verdicts.
Key sentences
- "Async between detector and Judge because of speed mismatch and decoupling; sync to Arena because the caller needs the answer."
- "The model recommends, code acts."
- "At-least-once delivery plus idempotent operations gives effectively-once results across services."
- "Safeguards in layers, in different codebases."
Numbers (measured)
- Arena: Redis p95 63.5 ms vs DB 18.0 s on 1M players; 5,764 vs 12.6 req/s.
- Telemetry: ~24,900 events/s; recall 100% (50/50); FPR 0.11%; 0 lost, 0 duplicated across a kill; failover 14.4 s (target < 10 s, missed).
- Judge: 20/20 flags through an injected outage. Everything else is imaginary.
- Platform: designed and tested hop by hop; not yet run live end to end.