wu-sheng opened a new pull request, #32: URL: https://github.com/apache/skywalking-horizon-ui/pull/32
## Live topology for the 3D Infrastructure Map The `/3d/map` scene now builds its **structure from live OAP** instead of the committed `demo-topology.json` snapshot, so the map is correct on any deployment — not just the showcase. Backend contracts are unchanged (same `bff.layer.services` + `bff.layer.topology` the 2D pages use). ### How it works - **Sequential, low-concurrency load.** A new `useLiveTopology` composable reads each layer's service roster (`bff.layer.services`) and — for `serviceMap`-capable layers — its service map (`bff.layer.topology`, depth 1, 2h@HOUR) **one layer at a time**, assembling a `DemoTopology` byte-compatible with the snapshot so `buildSceneGraph` consumes either source unchanged. Per-layer try/catch means one unreachable layer never aborts the run. - **Drives the existing pipeline stages.** `services` / `templates` / `topologies` / `layout` now report live counts + per-layer probes to the status strip; `metrics` is unchanged (it consumes the same `servicesByLayer`). - **Structure-hash rebuild.** The scene builds its graph once at setup, so it is re-keyed on a per-layer hash of service rosters + edge counts. A 60s refresh that finds the same structure leaves the key unchanged — **no remount, so the camera and metric/alarm visuals persist** — while a service appearing/disappearing rebuilds the affected tier. - **Snapshot is the fallback.** Rendered until the first sequential load lands, if the load returns empty, or when `?live=0` is set (debug/comparison escape hatch). - **Camera default** tuned to a tighter, slightly lower 3/4 framing. ### Validation (demo OAP) Sequential replay against `demo.skywalking.apache.org`: **73 services / 17 layers, 3 topology maps** (k8s_service / general / mesh), 21 sequential calls in ~6s, zero errors. Service ids (`base64(name).1`) and call shapes match the snapshot contract; `buildSceneGraph` drops virtual nodes (`User`) and unknown endpoints exactly as it does for the snapshot. UI + BFF `type-check` and `license-eye` clean. ### Deferred (follow-ups) - **Cross-layer hierarchy** (`hierarchy`) stays empty in live mode — Smartscape peers are a per-service fetch left for a later phase. - **First-paint cascade-clear.** On a deployment where the snapshot differs from live, the snapshot shows for ~6s before the live structure swaps in. A "Reading data…" gate (per the cascade-clear principle) would be cleaner than the brief snapshot flash; deferred pending review. - **Camera default** is a best-effort match to the requested framing; easy to fine-tune. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
