Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-shortest-path-and-routing

Shortest Path Algorithms (Dijkstra, A*, Bellman-Ford & OSPF Routing)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Shortest Path Algorithms (Dijkstra, A*, Bellman-Ford & OSPF Routing) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-shortest-path-and-routing/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-shortest-path-and-routing)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-shortest-path-and-routing)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-shortest-path-and-routing" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Shortest Path Algorithms (Dijkstra, A*, Bellman-Ford & OSPF Routing) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Origin - Destination"]
  n1_1[("Distance Table")]
  n2a_2[("Min-Heap Priority Q")]
  n2b_3["Admissible Heuristic"]
  n3_4["Optimal Route"]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Relax edge · Array"| n1_1
  n1_1 -->|"2a. Pop min · OE log V"| n2a_2
  n1_1 -->|"2b. h = d* · A*"| n2b_3
  n2a_2 -->|"3a. Emit route · Path"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Origin -> DestinationSTATELESS
    Weighted Road / Network Graph
  • Distance TableSTATEFUL
    dist[v] initialized to +Inf
  • Min-Heap Priority QSTATEFUL
    Pops lowest frontier
  • Admissible HeuristicSTATELESS
    A* Haversine / landmark lower bound
  • Optimal RouteSTATELESS
    Reconstructed path + total cost
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Origin -> Destination → Distance Table (Relax edge)[Array]
  2. Distance Table → Min-Heap Priority Q (Pop min)[OE log V]
  3. Distance Table → Admissible Heuristic (h <= d*)[A*]
  4. Min-Heap Priority Q → Optimal Route (Emit route)[Path]
  5. Admissible Heuristic → Optimal Route (Merge)[RAM]
  6. Optimal Route → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →