# pranavnadda/gnmi-telemetry-console architecture

> Architecture diagram of the GitHub repository pranavnadda/gnmi-telemetry-console, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pranavnadda/gnmi-telemetry-console
- Repository: https://github.com/pranavnadda/gnmi-telemetry-console

## Overview

This gNMI Telemetry Console collects sampled telemetry from a network target and exposes it through a local dashboard. The runtime starts from configuration, establishes an mTLS gRPC channel, subscribes to configured paths, normalizes updates into an in-memory latest-value and statistics store, and serves JSON and dashboard content for browser polling. Reconnect/backoff and connection statistics are part of the collection lifecycle. The README documents the simulator and dashboard capabilities; sampled source supports the core wiring, though the embedded page’s polling implementation was not sampled.

Main entry points: [`src/main/java/com/arkay/gnmipoc/DemoMain.java`](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/DemoMain.java) (Runtime and HTTP), [`src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java) (Subscribe lifecycle), [`src/main/java/com/arkay/gnmipoc/TelemetryStore.java`](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/TelemetryStore.java) (Telemetry store), [`src/main/java/com/arkay/gnmipoc/ConnectionStats.java`](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/ConnectionStats.java) (Connection stats)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collect["Secure collection"]
  node_config["Subscription config"]
  node_subscriber["Subscribe lifecycle"]
  node_channel["TLS channel"]
  node_auth["Call credentials"]
  node_stats["Connection stats"]
end

subgraph group_model["Telemetry processing"]
  node_pathparser["Path parser"]
  node_extractor["Value extraction"]
  node_store[("Telemetry store")]
  node_sample["Path sample<br/>[PathSample.java]"]
end

subgraph group_serve["Local dashboard"]
  node_main["Runtime and HTTP<br/>[DemoMain.java]"]
  node_ui["Dashboard page<br/>[index.html]"]
  node_api["HTTP JSON API<br/>[DemoMain.java]"]
end

node_operator(("Operator"))
node_simulator["gNMI target"]
node_browser(("Browser"))

node_operator -->|"starts"| node_main
node_main -->|"loads"| node_config
node_main -->|"starts"| node_subscriber
node_main -->|"creates"| node_store
node_main -->|"creates"| node_stats
node_subscriber -->|"builds"| node_channel
node_subscriber -->|"applies"| node_auth
node_subscriber -->|"parses paths"| node_pathparser
node_subscriber -->|"records updates"| node_store
node_subscriber -->|"updates state"| node_stats
node_simulator -.->|"streams telemetry"| node_subscriber
node_store -->|"creates"| node_sample
node_main -->|"registers endpoints"| node_api
node_api -->|"reads samples"| node_store
node_api -->|"reads status"| node_stats
node_main -->|"serves page"| node_ui
node_browser -->|"opens dashboard"| node_main
node_browser -.->|"polls JSON"| node_api

click node_config "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/SubscribeConfig.java"
click node_main "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/DemoMain.java"
click node_subscriber "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java"
click node_channel "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiChannelFactory.java"
click node_auth "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/UserPassCallCredentials.java"
click node_pathparser "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiPathParser.java"
click node_extractor "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiValueExtractor.java"
click node_store "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/TelemetryStore.java"
click node_sample "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/PathSample.java"
click node_stats "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/ConnectionStats.java"
click node_ui "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/resources/static/index.html"
click node_api "https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/DemoMain.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_subscriber,node_channel,node_auth,node_stats,node_browser toneBlue
class node_pathparser,node_extractor,node_store,node_sample toneAmber
class node_main,node_ui,node_api toneMint
class node_operator,node_simulator toneIndigo
```

## Components

### Secure collection

- [Subscription config](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/SubscribeConfig.java): `src/main/java/com/arkay/gnmipoc/SubscribeConfig.java`
- [Subscribe lifecycle](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java): `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`
- [TLS channel](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiChannelFactory.java): `src/main/java/com/arkay/gnmipoc/GnmiChannelFactory.java`
- [Call credentials](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/UserPassCallCredentials.java): `src/main/java/com/arkay/gnmipoc/UserPassCallCredentials.java`
- [Connection stats](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/ConnectionStats.java): `src/main/java/com/arkay/gnmipoc/ConnectionStats.java`

### Telemetry processing

- [Path parser](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiPathParser.java): `src/main/java/com/arkay/gnmipoc/GnmiPathParser.java`
- [Value extraction](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/GnmiValueExtractor.java): `src/main/java/com/arkay/gnmipoc/GnmiValueExtractor.java`
- [Telemetry store](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/TelemetryStore.java): `src/main/java/com/arkay/gnmipoc/TelemetryStore.java`
- [Path sample](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/PathSample.java): `src/main/java/com/arkay/gnmipoc/PathSample.java`

### Local dashboard

- [Runtime and HTTP](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/DemoMain.java): `src/main/java/com/arkay/gnmipoc/DemoMain.java`
- [Dashboard page](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [HTTP JSON API](https://github.com/pranavnadda/gnmi-telemetry-console/blob/main/src/main/java/com/arkay/gnmipoc/DemoMain.java): `src/main/java/com/arkay/gnmipoc/DemoMain.java`

### Other components

- **Operator**
- **gNMI target**
- **Browser**

## Connections

- Operator → Runtime and HTTP: starts (evidence: `README.md`)
- Runtime and HTTP → Subscription config: loads (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Runtime and HTTP → Subscribe lifecycle: starts (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Runtime and HTTP → Telemetry store: creates (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Runtime and HTTP → Connection stats: creates (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Subscribe lifecycle → TLS channel: builds (evidence: `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`)
- Subscribe lifecycle → Call credentials: applies (evidence: `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`)
- Subscribe lifecycle → Path parser: parses paths (evidence: `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`)
- Subscribe lifecycle → Telemetry store: records updates (evidence: `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`)
- Subscribe lifecycle → Connection stats: updates state (evidence: `src/main/java/com/arkay/gnmipoc/GnmiSubscriber.java`)
- gNMI target → Subscribe lifecycle: streams telemetry (evidence: `README.md`)
- Telemetry store → Path sample: creates (evidence: `src/main/java/com/arkay/gnmipoc/TelemetryStore.java`)
- Runtime and HTTP → HTTP JSON API: registers endpoints (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- HTTP JSON API → Telemetry store: reads samples (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- HTTP JSON API → Connection stats: reads status (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Runtime and HTTP → Dashboard page: serves page (evidence: `src/main/java/com/arkay/gnmipoc/DemoMain.java`)
- Browser → Runtime and HTTP: opens dashboard (evidence: `README.md`)
- Browser → HTTP JSON API: polls JSON (evidence: `README.md`)
