Architecture overview¶
How the pieces fit together: from a player finishing a map in-game to a number on the website.
The integration spine¶
flowchart LR
subgraph game[In-game]
TM[Trackmania 2020 servers]
K[kontrol controllers]
TM <--> K
end
subgraph platform[Kacky platform]
API[Backend]
DB[(Database)]
API <--> DB
end
subgraph clients[What people use]
WEB[Website]
ADMIN[Admin panel]
BOT[Discord bot]
end
K -- "messages" --> API
API -- "web + live updates" --> WEB
API -- "web" --> ADMIN
API -- "notifications" --> BOT
- kontrol: the controllers that run next to the Trackmania 2020 servers, drive them, and report what happens. See The game servers.
- The message bus: kontrol and the backend talk over a queue, so neither has to be online at the same moment. See How the game talks to the platform.
- The backend: the one service that owns all the data and the rules. See The backend and the data.
- What people use: the website (stats, rankings, live status), the admin panel (running events and servers), and the Discord bot.
Why it is split up like this¶
The game servers and the backend have separate lives. Servers restart and drop offline. The backend deploys on its own schedule. A queue between them means neither has to wait on the other. kontrol reports what happened. When the backend is ready, it catches up. Putting every rule in one backend means there is a single source of truth, so the website, the admin panel, and the bot never disagree.
Who owns what¶
| Question | Where the answer comes from |
|---|---|
| Best times, ranks, world records | Online records only, never raw finishes. See Records vs Finishes. |
| How much a map was played | Finish counts. |
| Is a server alive? | Its own regular check-in. More than five minutes of silence marks it offline. |
Going deeper¶
The bullets above link to the page for each piece. Two more pages cover what the diagram does not show:
- Built to not lose anything: what keeps a finish, a record, or the whole database from going missing.
- Running the servers: how the game server fleet is described in code and rebuilt from scratch.