FireDevOps FireMUD & Ops Projects

πŸ—οΈ FireMUD System Architecture: Overview

This document provides a high-level view of FireMUD’s system architecture, showing how major services, protocols, and data flows interact across the platform.


🧩 Core Architecture Principles

πŸ–ΌοΈ See also: System Architecture Diagram and System Context Diagram


πŸ” Reconnection Strategy

FireMUD supports seamless gameplay recovery through a layered reconnection model:

LayerResponsibility
TCP Proxy ServiceBuffers Telnet input; clears on disconnect
Spring Cloud GatewayStateless; re-establishes backend connections on reconnect
Game Session ServiceRestores gameplay session using Redis

πŸ”— See Reconnection Strategy for full details on session resumption, reauthentication, and failure handling.


πŸ”— Major Components and Their Roles

ComponentPurpose
Web ClientsModern browser clients using WebSocket or HTTP to access the platform
MUD ClientsTraditional Telnet clients connecting via TCP, proxied into the system
TCP Proxy ServiceAccepts Telnet connections, buffers input, forwards over WebSocket
Spring Cloud GatewayHandles WebSocket termination, routing, auth, monitoring
Game Session ServiceManages player sessions, tick orchestration, stores runtime flags, input validation
Account ServiceManages player accounts, login, auth, subscriptions, and bans
Entity Management ServiceHandles all entity data: players, NPCs, items, stats, inventories
World Management ServiceOwns maps, rooms, and tick region structure
Game Logic ServiceExecutes gameplay mechanics; resolves actions deterministically
Automation & Scripting ServiceTriggers AI and scripted behaviors
Social & Groups ServiceManages chat, mail, guilds, and social features
Logging & Admin ServiceProvides admin tools, metrics dashboards, audit logs, toggles runtime flags
Game Design ServiceAuthoring tool for designing and publishing game data; defines feature flags

🌐 Communication Flows

FlowProtocol
Web Clients β†’ Spring Cloud GatewayWebSocket (wss) / HTTP (https)
MUD Clients β†’ TCP Proxy ServiceRaw TCP (Telnet)
TCP Proxy Service β†’ Spring Cloud GatewayWebSocket (wss)
Spring Cloud Gateway β†’ Game Session ServiceWebSocket (wss)
Game Session Service β†’ Other MicroservicesgRPC (internal)

βœ… All internal communication from the Game Session Service onward uses gRPC with strict schema enforcement.


πŸ“¦ Data and State Management

πŸ“Œ See Redis Architecture for key structure and durability strategies.


⏱️ Game Loop / Tick Model

FireMUD uses a Hybrid Tick Model to balance responsiveness and fairness:

πŸ”— Tick execution, staging/rollback, retry policies, and crash recovery are detailed in Tick System and Runtime Design


πŸ” Authentication and Authorization Flow

Clients authenticate using the LOGIN command, processed by the Game Session Service. On disconnect, clients must reauthenticate to resume gameplay. Session state is stored in Redis and reused for recovery.

πŸ”— See Authentication & Authorization for JWT format and session flow.


πŸ“Š Observability and Monitoring

See Logging & Monitoring for the full pipeline, including Fluent Bit, Prometheus, and related dashboards.

πŸ”— Additional Redis metrics are noted in Redis Architecture.


πŸ—‚οΈ Deployment Layers

LayerTechnology
Client LayerBrowser, Telnet MUD Clients
Proxy LayerTCP Proxy Service (LoadBalancer Service)
API Gateway LayerSpring Cloud Gateway (LoadBalancer Service)
Gameplay Session LayerGame Session Service
Service LayerMicroservices (Account, Entity, World, Logic, etc.)
Infrastructure LayerKubernetes with IPVS, Docker Compose (for local development)

Deployment health checks (readiness and liveness probes) for these layers are described in detail in Deployment Environments.

Environment-specific routing is configured through Spring profiles (application-dev.yml, application-prod.yml). See Deployment Environments for how these profiles differ in Docker Compose versus Kubernetes.


πŸ”Ž Notes on Responsibility Alignment

🧠 Why Game Session Service vs Game Logic Service? Game Logic Service is stateless and deterministic. Game Session Service governs pacing, conflict handling, and orchestration across distributed tick regions.


Diagrams

Infrastructure & Deployment

Runtime & Security

Responsibilities