FireDevOps FireMUD & Ops Projects

πŸ” FireMUD System Architecture: Reconnection Strategy

FireMUD enables seamless gameplay recovery across network interruptions, client reconnects, and backend service restarts β€” using a layered reconnection model and Redis-backed session state.


🧩 Reconnection Layers

LayerResponsibility
TCP Proxy ServiceParses Telnet input; clears input buffer on disconnect
Spring Cloud GatewayStateless WebSocket passthrough; re-establishes backend connection automatically
Game Session ServiceRestores session from Redis; rebinds socket, tick region, and timers

Each layer handles fault tolerance independently. Only client connection loss requires reauthentication. Infra restarts (Proxy, Gateway, Session) are transparent if the client remains connected.


πŸ›°οΈ Layer Behavior Breakdown

TCP Proxy Service (Telnet Clients)

Spring Cloud Gateway (Web Clients)

Proxy and Gateway restarts do not interrupt gameplay as long as the client’s physical connection is maintained.

Game Session Service

πŸ”— Full structure of Redis session keys is documented in Session Keys and Gameplay Binding


πŸ” When Reauthentication Is Required

Clients must send a LOGIN command after any disconnect, such as:

Redis-backed session state enables seamless resumption if valid, or fresh login if expired.

🧭 For full details on LOGIN behavior, argument formats, and session flow, see Authentication & Authorization


πŸ‘₯ Multi-Client and Session Takeover

Gameplay resumes cleanly when a session is resumed β€” whether due to reconnect or takeover.

πŸ”„ For full takeover behavior, including forced logins from a different client and Redis socket rebinding, see Authentication & Authorization.


πŸ”„ Resume vs Reload Scenarios

EventResult
Client disconnect (TCP/WebSocket)Requires new LOGIN; may resume via Redis
Proxy/Gateway/Game Session Service restartTransparent β€” if client remains connected
Manual re-LOGIN from same characterTreated as reconnect; resumes if Redis intact
Redis session expired/missingTreated as fresh login; gameplay starts anew
New client logs in as same characterOld session terminated; new one resumes control

πŸ”‘ Only client disconnection requires LOGIN. Backend service restarts are invisible unless the physical connection is lost.


🧠 Design Principles