Skip to content

Project Structure

Services and their jobs

BlueDragon is split into a few crucial services:

  • Our Minestom implementation runs all the games.
  • Velocity routes players between game servers and handles the server list ping.
  • Puffin handles all of the coordination and messaging between services. It manages the player queue, creates game instances on demand, and handles parties, private messages, and map serving. It also tracks each player’s Jukebox queue so songs continue playing when a player switches servers.
  • MongoDB stores player profiles and game data.
  • LuckPerms handles player permissions and ranks.

Messaging

These services need to communicate with each other to perform important tasks like queueing for games, sending players between servers, and handling parties.

We have proto (Protocol buffer) files in a GitHub repository that define our schema, and then we use the Protobuf Gradle plugin to generate Java and Kotlin clients to use across our applications.

Whenever a game server or proxy starts up, it attempts to create a gRPC channel to Puffin. Using the shared schema, they can communicate in a binary format with an automatically-generated client and server.

Learn more about gRPC in their documentation.

ServiceInitiates a Connection WithResponsibilities (and proto file links)
Game ServerPuffinPlayer tracking, queueing, game state tracking, parties, receiving chat messages, jukebox, map data
ProxyPuffinSending players, finding available lobbies, discovering game server IPs, private messages

gRPC channels are bidirectional, so once a connection is established, messages can flow both ways.