From beginner to confident: the technologies behind Fairplay
You built three connected Java systems: Arena (a REST backend), Telemetry (real-time cheat detection on Kafka Streams) and Judge (an LLM moderation agent). These 22 modules teach every technology they use, from zero up to the depth interviewers probe (01–15). Then they go deeper: what could have gone wrong, the decisions and struggles, the low-level design and how to scale (16–18). Finally, a file-by-file atlas of all three codebases (19–21), so every file is covered. Module 22 closes with a prioritised roadmap of further improvements.
Each project already has a code walkthrough in its Code Explanation folder. Those explain what each file does. These modules explain the technology underneath: why Kafka has partitions, what a transaction actually guarantees, how a JWT is verified, why a circuit breaker has three states. When an interviewer asks a follow-up, it is almost always about the technology, not your file names. Use both: learn the technology here, then reread your project guide and it will make much more sense.
Progress is saved in this browser only (localStorage). Each module has a "Mark this module complete" button at the bottom, and every interview question has an "I can answer this out loud" checkbox.
Part I: the technologies (modules 01–15)
They are ordered so that each module only needs the ones before it. Times are for a careful first read, including the quiz.
The big picture: Fairplay as one system
How the three projects talk to each other, the contracts between them, and your 30-second, 2-minute and 5-minute pitches.
P1 P2 P3
Java 21: the language and concurrency
Records, sealed types, pattern matching, generics, collections, streams, Optional, BigDecimal, Clock, threads, virtual threads, atomics, the JVM heap.
P1 P2 P3
Spring Boot core
Inversion of control, dependency injection, beans, auto-configuration, starters, configuration properties, profiles, events, scheduling, Actuator, Boot 4 changes.
P1 P2 P3
REST APIs with Spring MVC
HTTP, REST design, status codes, idempotency, controllers, validation, ProblemDetail errors, pagination, Jackson 3, MapStruct, OpenAPI.
P1 P2 P3
Spring Security, JWT and refresh tokens
Authentication versus authorization, the filter chain, bcrypt, JWT structure and signing, stateless sessions, roles, refresh-token rotation and reuse detection.
P1 P3
PostgreSQL, SQL and Flyway
Relational modelling, constraints, indexes and B-trees, query plans, ACID, isolation levels, row locks, deadlocks, triggers, percentiles, keyset pagination, migrations.
P1
JPA, Hibernate, transactions and locking
Entities, the persistence context, dirty checking, lazy loading and N+1, repositories, @Transactional propagation, proxies, optimistic and pessimistic locking, HikariCP.
P1
Redis and keeping a cache consistent
Data structures, the sorted set and skip lists, O(log N) ranking, pipelining, atomic rebuilds, the dual-write problem, after-commit events, the outbox pattern.
P1
Apache Kafka and Spring Kafka
Topics, partitions, offsets, keys, producers, consumer groups, rebalancing, retention and compaction, replication, KRaft, idempotence, transactions, dead-letter topics.
P2 P3
Kafka Streams
Topologies, KStream and KTable, state stores and changelogs, windows and grace, repartitioning and co-partitioning, the Processor API, exactly-once, standbys, failover.
P2
LLM agents on the Claude API
Tokens, the Messages API, tool use and the agent loop, structured output, prompt caching, model routing, cost, guardrails, prompt injection, evaluation.
P3
Resilience and reliability
Timeouts, retries, exponential backoff and jitter, circuit breakers, rate limiters, decorator order, idempotency, delivery guarantees, poison messages.
P1 P2 P3
Testing
The test pyramid, JUnit 5, AssertJ, Mockito, MockMvc, Testcontainers, WireMock, TopologyTestDriver, Awaitility, fixed clocks, JaCoCo coverage, Surefire and Failsafe.
P1 P2 P3
Maven, Docker, CI and observability
The Maven lifecycle, multi-module builds, annotation processors, Docker images and multi-stage builds, Compose, GitHub Actions, Micrometer, Prometheus, Grafana, k6, percentiles.
P1 P2 P3
The interview playbook
How to present the projects, STAR stories from real bugs and decisions, honest handling of the numbers, system-design extensions, and a rapid-fire drill.
P1 P2 P3
Part II: deep dives (modules 16–18)
Read these after Part I. They answer the senior-level questions: what went wrong, why it's built this way, and what happens at a million players.
What could have gone wrong, decisions, struggles, lessons
Every failure mode across the 11 risk categories, the 18 decisions that mattered, where the build struggled, 30 lessons, and what is still wrong today.
P1 P2 P3
How the software was designed (LLD)
Spec-first process and build orders, the forces behind the classes, principles, SOLID, 20+ patterns mapped to classes, sequence diagrams, testability seams, LLD-round practice.
P1 P2 P3
Scaling to huge numbers
Back-of-envelope maths from your measurements to 1M concurrent players: what breaks first in each service, and a staged 10× / 100× / 1,000× plan.
P1 P2 P3
Part III: the codebase atlas (modules 19–21)
Every file of every project, with what it is, why it's built that way, which tests prove it, and which module teaches the idea. Use it with the code open. An interviewer can point at any file, and you'll have something confident to say.
Atlas: Arena, file by file
All 81 main files, both migrations, 15 test classes, build, delivery and docs, plus code-level probe questions.
P1
Atlas: Telemetry, file by file
4 modules, 75 main files, 52 test files, scripts, the 9 measured reports, ops and docs, plus probe questions.
P2
Atlas: Judge, file by file
3 modules, 97 classes plus prompts, 59 test files, evaluation and ops files, plus probe questions.
P3
Part IV: what comes next (module 22)
How to study with these modules
Reading once will not make you confident. Saying it out loud will. Every module follows the same shape so you can build a habit:
- "By the end you can answer": the questions the module prepares you for. Read them first, so your brain knows what to look for.
- The concept from zero, with an everyday analogy. Do not skip the analogies: in an interview, a good analogy shows you understand something, not just that you memorised it.
- How it works underneath: the mechanism. This is what separates "I used Kafka" from "I understand Kafka".
- "In your projects" boxes (purple) point to the exact file in your code where the idea is used, usually with a short snippet. Open that file in IntelliJ next to the page.
- Interview questions in four levels: Basic Intermediate Deep Curveball. Cover the answer, answer out loud, then open it and compare. Tick "I can answer this out loud" only when you could, and the tick shows up on this page.
- The quiz: short multiple-choice questions that check your understanding, with an explanation for each answer.
- The cheat sheet: one screen to reread the morning of the interview.
After each section, close the page and explain the idea to an imaginary interviewer for 60 seconds, using one example from your own project. If you get stuck, that is exactly the part to reread. Recording yourself on your phone is uncomfortable, and it works better than anything else.
Study plans
| Time you have | What to do |
|---|---|
| 4 weeks (about 1.5–2 h a day) recommended |
Week 1, foundations: day 1: 01. Days 2–3: 02. Day 4: 03. Day 5: 04. Day 6: 05. Day 7: review every question you have not ticked. Week 2, data and streaming: days 8–9: 06. Days 10–11: 07. Day 12: 08. Day 13: 09. Day 14: 10. Week 3, agents and delivery: day 15: 11. Day 16: 12. Day 17: 13. Day 18: 14. Days 19–21: 15, plus two mock interviews (a friend, or you recording yourself) using the rapid-fire drill. Week 4, depth and the code itself: day 22: 16. Day 23: 17. Day 24: 18. Days 25–27: one atlas per day (19, 20, 21) with the code open, answering each probe question. Day 28: a final mock interview, then the module 16 and 18 cheat sheets. Afterwards, pick the top five items from module 22 and start on them. |
| 1 week | Day 1: 01 and 15 (the pitches). Day 2: 02 and 03. Day 3: 04 and 05. Day 4: 06 and 07. Day 5: 08 and 09. Day 6: 10 and 11. Day 7: 16 (decisions and struggles) and 18 (scaling), the 12–14 cheat sheets, then the rapid-fire drill in 15. |
| 3 days (emergency) | Day 1: 01, then 15 (pitches, STAR stories, honesty). Day 2: the modules for the job you are interviewing for: backend → 03, 04, 06, 07; streaming or data → 09, 10, 12; AI engineering → 11, 12. Day 3: 16's "still wrong" and "struggles" sections, 18's two-minute answer, every cheat sheet, then the rapid-fire drill twice. |
Which technology lives where
Most of the stack appears in more than one project. When you learn it once you can talk about it in three contexts, and that is a strong signal in an interview ("I used Kafka as a producer, as a Streams application and as a Spring consumer with a dead-letter topic").
| Technology | Arena (P1) | Telemetry (P2) | Judge (P3) | Module |
|---|---|---|---|---|
| Java 21 (records, sealed, switch, virtual threads) | ✓ | ✓ | ✓ | 02 |
| Spring Boot 4.1 | ✓ web app | ✓ 3 apps | ✓ service + CLI | 03 |
| REST / Spring MVC / validation / ProblemDetail | ✓ 18 endpoints | client (posts to Arena) | client (reads and writes Arena) | 04 |
| Spring Security, JWT, bcrypt | ✓ issues and verifies | logs in as a service | logs in as a service | 05 |
| PostgreSQL 17, SQL, Flyway | ✓ | – | – | 06 |
| JPA / Hibernate / transactions / locking | ✓ | – | – | 07 |
| Redis 7 (sorted sets) | ✓ | – | – | 08 |
| Apache Kafka 4.2 (KRaft) and Spring Kafka | – (a "next step") | ✓ producer, bridge consumer | ✓ consumer, producer, compacted state | 09 |
| Kafka Streams | – | ✓ the detector | – | 10 |
| Claude API, tool use, prompt caching, evals | – | – | ✓ | 11 |
| Resilience4j, retries, backoff, DLT | idempotent retries | ✓ Spring Kafka backoff | ✓ full stack | 12 |
| JUnit 5, AssertJ, Mockito, Testcontainers | ✓ | ✓ + TopologyTestDriver | ✓ + WireMock | 13 |
| Maven, Docker, Compose, GitHub Actions, JaCoCo | ✓ | ✓ multi-module | ✓ multi-module | 14 |
| Micrometer, Prometheus, Grafana, k6 | ✓ + k6 benchmark | ✓ dashboard | ✓ dashboard | 14 |
Your existing project guides
These are the code walkthroughs that already live in each project. Read the matching technology module here first, then the relevant section there.
project1_explained.html
A beginner tour of every package, a match's journey, the tests, and an interview section.
project1_code_guide.html
A denser reference: package by package, key flows, all 18 endpoints, gotchas.
project2explained.html
The journey of one event, each module file by file, the measured results, and interview prep.
project3_explained.html
The journey of one flag, judge-core file by file, worked cost examples, and interview prep.
One rule before you start: know which numbers are real
Interviewers often ask "how did you measure that?". Your credibility depends on knowing exactly which numbers were measured. Module 15 covers how to say this confidently. Here is the summary:
| Project | Measured (you can quote these) | Be careful |
|---|---|---|
| Arena | k6 benchmark on 1,000,000 players: Redis rank lookup p95 63.5 ms at 5,764 req/s, versus PostgreSQL COUNT(*) p95 18.0 s at 12.6 req/s. 71 tests, 89.6% line coverage. | The last full ./mvnw verify ran before a small test-clock fix. That test passes on its own, but the whole suite has not been re-run since. Re-run it before quoting "all green". |
| Telemetry | About 24,900 events/s, 100% recall (50 of 50 cheaters), 0.11% false-positive rate, 0 lost and 0 duplicated events across a mid-run kill, 269 unit + 17 integration tests. | Failover took 14.4 s against a target of under 10 s (missed). The at-least-once run showed no duplicates either, so the comparison did not prove exactly-once is better. Lag did not stay flat during failover. |
| Judge | All tests pass with no API key. ResilienceIT: 20 of 20 flags judged after a 20-second injected outage, none dead-lettered. | Every other result number (precision, recall, cost saving, latency) is an "optimal imaginary value", not a measurement. The live SDK smoke test has never been run. Never quote those numbers as real. |
| Platform (end to end) | Each project on its own, as above. | The three have never been run together live. The bridge and the simulator's registrar were tested against a stub Arena; the Judge's Arena and Claude calls against WireMock; the measured Telemetry run had Arena integration switched off. The full chain is designed and tested hop by hop, not demonstrated end to end. |