Skip to content

Add cluster-aware gateway routing and client presentation#29

Closed
VG-prog wants to merge 4 commits into
walkline:masterfrom
VG-prog:vg/tc9-gateway
Closed

Add cluster-aware gateway routing and client presentation#29
VG-prog wants to merge 4 commits into
walkline:masterfrom
VG-prog:vg/tc9-gateway

Conversation

@VG-prog

@VG-prog VG-prog commented May 22, 2026

Copy link
Copy Markdown

Summary

This PR turns the gateway into the cluster presentation layer for connected clients.

The gateway now understands clustered worldserver selection, native transport handoff, session lifecycle transitions, bounded retry/backoff, and service-driven packet rendering. The goal is to keep AzerothCore authoritative for gameplay while allowing ToCloud9 to route cross-worldserver and crossrealm presentation safely.

What changed

  • Added cluster-aware session routing, worldserver retry/backoff, redirect readiness, and session registry logic.
  • Added listeners for characters, registry, group, guild, matchmaking, and chat events.
  • Added gateway-side rendering and routing for groups, guilds, guild bank, LFG, battlegrounds, arenas, chat, channels, mail, name queries, and account data.
  • Added object-update based player-state extraction for group frames, including HP, power, aura, map, zone, class, level, online, and freshness metadata.
  • Added a bulk player-state barrier so gateway publishes snapshots efficiently instead of spamming per-field updates.
  • Preserved already serialized packets where the owning worldserver should remain the packet source.

Why this matters

Gateway is the right place to adapt distributed service state into client-visible packets. This avoids high-frequency worldserver polling and keeps most cross-server presentation outside the AzerothCore gameplay loop.

Validation

  • git diff --check origin/master..HEAD
  • env GOCACHE=/tmp/tc9-go-build GOFLAGS=-buildvcs=false go build ./...
  • env GOCACHE=/tmp/tc9-go-build GOFLAGS=-buildvcs=false make install

VG-prog added 4 commits May 22, 2026 21:49
Add the shared protobuf, generated runtime code, events, GUID helpers, auth identity helpers, and configuration contracts used by clustered gateway, registry, group, guild, matchmaking, and sidecar flows.

Tests, local tooling, and broad documentation are intentionally excluded from this upstream-focused scope.
Wire service discovery, map readiness, stale-safe health and metrics observers, degraded game-server health handling, gateway-scoped cleanup, and shared GUID allocation support.

Registry and health code now distinguish world-loop degraded state from process or transport death while preserving live map ownership.
Keep world-loop degraded game servers registered for ownership and existing lookups, but mark them as non-admitting so new player placement skips them. Clear the drain state on successful health recovery and fall back to healthy all-map nodes when an assigned owner is degraded.
Route gateway sessions through cluster-aware worldserver selection, native transport handoff, bounded retry/backoff, cross-service event listeners, and client-facing packet rendering for social, group, guild, guild bank, LFG, battleground, arena, mail, channel, and player-state flows.
@VG-prog

VG-prog commented May 22, 2026

Copy link
Copy Markdown
Author

Closing this draft because it was opened from a stacked branch while targeting master, so the GitHub diff includes earlier slices and is not an isolated review target.

Replacement: #37 (#37)

That replacement PR presents the current integration honestly as one review surface. Sorry for the review noise.

@VG-prog VG-prog closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant