Wayam AI

Arjuna for TASRA Mines

REAL-TIME DATA PIPELINE · FAILURE HANDLING · RECOVERY

← Back to diagramDownload Markdown

Arjuna for TASRA Mines — Real-Time Data Pipeline and Failure Handling

Scope. How camera video, events and telemetry reach the Arjuna Command Centre in real time, what the system does automatically when any part of the chain fails, and how data is recovered afterwards. Companion to the architecture diagram (Full architecture, Remote & vehicle flow and Resilience & fallback views).

Status. Proposal, September 2026. Figures are design targets sized for a mine-site deployment; they are confirmed during site survey and factory acceptance testing. Everything in this document runs on the TASRA intranet — no camera, NVR or edge node ever needs Internet access.


1. The one-page version

  1. Every camera is recorded as close to itself as possible. Fixed cameras record on the zone's Local NVR; remote cameras record on their SD card and edge node; vehicles record on the Mobile NVR. The central site is never a precondition for recording.
  2. Two streams per camera. The main stream (full resolution) is the evidence copy and stays on the NVR. The sub-stream (640p, 5–8 fps sampled) is what Arjuna AI analyses and what the live wall shows. Alerts pull the high-resolution clip on demand.
  3. Edge AI keeps working without the core. The Edge Arjuna Node runs the same detectors locally, buffers events and clips for 72 hours, and replays them to the central Event Engine when the link returns.
  4. Every link has a fallback and every buffer has a size. Fibre → PtP wireless → private LTE → secured 4G/5G VPN. NVR 30 days, edge 72 h, vehicle 72 h, camera SD 7 days.
  5. The operator always knows. Camera Health turns amber within 30 s of a problem and red within 90 s, with an automatic ticket. Nothing fails silently.

2. End-to-end real-time path

2.1 Stage by stage

#StageWhat happensProtocol / mechanismRuns where
1CaptureCamera encodes main stream (1080p–4 MP @ 15 fps, H.265) and sub-stream (640p @ 8 fps)ONVIF Profile S/T, RTSP over TCPCamera
2Zone aggregationIndustrial PoE switch powers cameras and forwards both streams802.3bt PoE, VLAN 10, ERPS ring uplinkZone cabinet
3Local recordingLocal NVR records the main stream continuously (Profile G), keeps 30 days on RAID 5RTSP pull, ONVIF Profile G playbackZone / site NVR
4Discovery and normalisationEdge Gateway discovers cameras, proxies the sub-stream, publishes a health beacon every 10 sONVIF discovery, RTSP proxy, MQTT beaconEdge node
5Edge inference (optional)Edge Arjuna Node runs PPE / intrusion / vehicle detectors locally on 8–16 streams, cuts ±10 s clips on eventsGPU inference, local clip buffer 72 hEdge node
6TransportStreams and events cross the mine network — fibre first, wireless for remote and moving assets10G fibre ring, PtP / PtMP 5 GHz, Wi-Fi 6, private LTE, VPN fallbackMine connectivity
7SegmentationTraffic is confined to surveillance VLANs; OT firewall allows only gateway → Arjuna segmentVLAN 10–60, allow-list rules, IDSCore network
8AdaptationONVIF / RTSP / SDK / NVR-channel / dashcam adapters convert every vendor to one schemaAdapter per source type, auto-reconnect 5 sArjuna segment
9Unified Stream GatewayAssigns stream-id, exposes sub-stream + metadata, applies backpressure and retryInternal gRPC / RTSP re-publishArjuna segment
10Stream ManagerHardware decode (NVDEC), samples 5–8 fps per stream for AIGPU decodeArjuna core
11AI Scheduler + InferenceAssigns streams to N+1 GPU workers by zone priority; detectors run < 150 ms per frameBatch 8–16Arjuna core
12Tracking + RulesMulti-object tracking, zone / line-cross / dwell / direction / speed rulesRule engineArjuna core
13Event EngineDe-duplicates, scores severity, pulls the high-res clip from NVR or edge, writes metadataHTTPS clip pull, metadata DBArjuna core
14Message BusPublishes events (MQTT QoS 1 for UI push, Kafka topic with 7-day retention for replay)MQTT + KafkaArjuna core
15StorageClips and metadata land in tiered storage: hot 30 d SSD, warm 90 d, cold 365 d, object-lock for evidenceNAS / SANArjuna core
16Command CentreLive map, multi-camera wall (WebRTC), alerts, search, health, reports, SSOHTTPS, WebRTCOperator

2.2 Data types and where each one flows

DataSourcePathRate (per camera)Buffered at
Main stream (evidence)CameraCamera → PoE → Local NVR. Never streamed to the core unless an operator or event requests it4–8 MbpsNVR (30 d)
Sub-stream (AI + live)CameraCamera → PoE → Edge Gateway → network → Stream Gateway → Stream Manager0.5–1 MbpsNot buffered; regenerated live
Edge events + clipsEdge Arjuna NodeEdge → network → Event Engine (bypasses central inference)Bursty, ~2–10 MB per eventEdge (72 h)
Vehicle clips + GPSMobile NVRVehicle → Wi-Fi / LTE → Dashcam Adapter → Stream Gateway → Storage1 Hz GPS, clips on eventVehicle (72 h)
Health beaconsEdge Gateway, camerasMQTT every 10 s → Camera Health~1 KB / 10 sNot buffered
AlertsEvent EngineMessage Bus → Command Centre (MQTT push)On eventKafka (7 d)

2.3 Latency budget (glass to glass)

SegmentTargetNotes
Camera encode + packetise150–250 msDepends on GOP; sub-stream uses 1 s GOP
Zone switch → core (fibre)< 2 msWireless adds 5–20 ms; LTE adds 30–80 ms
Stream Gateway + decode100–200 msHardware decode
Live wall (WebRTC)300–500 msIncludes jitter buffer
Live view total< 2 sDesign target; typical 0.8–1.2 s on fibre
Inference + tracking + rules200–400 msSampled at 5–8 fps
Event Engine + clip cut1–2 sClip pull runs in parallel with the alert
Message Bus → operator screen< 200 msMQTT QoS 1
Alert total< 5 sFrom the frame where the violation appears to the operator's screen
Clip attached to alert< 30 sPulled from NVR / edge, hashed, stored

3. What fails, what the system does, how data comes back

Each scenario lists: how it is detected, what happens automatically (no operator action), what data is or isn't lost, how the gap is recovered, what the operator sees, and the recovery objectives. RTO is how long until the function is restored; RPO is how much data can be lost.

3.1 Camera and edge

F1 · A camera goes offline (power, cable, hardware)

F2 · Industrial PoE switch or zone cabinet fails

F3 · Local NVR disk or unit fails

F4 · Edge Gateway crashes or is rebooted

F5 · Edge Arjuna Node (GPU) fails

3.2 Connectivity

F6 · Fibre cut between a zone and the core

F8 · Vehicle leaves Wi-Fi / LTE coverage

F9 · Private LTE core or Wi-Fi controller fails

F10 · Public 4G / 5G VPN fallback is unavailable

3.3 Core network and security

F11 · Core or distribution switch fails

F12 · OT firewall fails or a rule change blocks surveillance traffic

3.4 Arjuna core

F13 · Unified Stream Gateway or an adapter crashes

F14 · GPU worker fails (central inference)

F15 · Message Bus (MQTT / Kafka) is unavailable

F16 · Central storage full or unreachable

F17 · Whole central site down (power, DC failure, planned maintenance)

F18 · Identity provider (AD / LDAP) unreachable

3.5 Summary table

#FailureLive viewAlertsRecordingRecoveryRPO
F1Camera offlineLost (that camera)Paused (that camera)Lost (that camera)Auto on returnOutage window
F2PoE switch / cabinetLost (zone)Paused (zone)Lost (zone)Ring < 50 ms or swap ≤ 30 minOutage window
F3Local NVROKOK (edge clips)Continuous lost, events keptDisk hot-swap / unit ≤ 4 hContinuous only
F4Edge GatewayGap < 1 minGap < 1 minOKAutoNone
F5Edge AI nodeOKCentral takes overOKAutoNone
F6Fibre cutRing: none. Isolated: priority cams onlyEdge-local, replayedOKAuto replayNone
F7Wireless degradedGraceful reductionEdge-localOK (SD + NVR)AutoNone
F8Vehicle out of coverageLost until returnQueuedOK (72 h)Resumable uploadNone ≤ 72 h
F9LTE / Wi-Fi controllerLost (all vehicles)Via VPNOK (72 h)HA < 1 minNone ≤ 72 h
F11Core switchBlip < 3 sOKOKAutoNone
F12FirewallSites isolatedEdge-local, replayedOKHA < 10 sNone
F13Stream GatewayGap < 10 sGap < 10 sOKAutoNone
F14GPU workerOKRe-assigned < 30 sOKAuto≤ 15 s
F15Message BusOKDelayed, in orderOKHA < 1 minNone
F16StorageOKMetadata now, clips pendingOKRetry from edgeNone
F17Central site downLost until standbyEdge-local, replayedOK everywhereStandby ≤ 1 hNone

4. Store-and-forward: how replay works

  1. Everything that leaves the edge has an ID and a timestamp. Events carry site / camera / event-id / t0 / t1; clips carry a SHA-256 hash.
  2. Buffers are on disk, not in memory. Edge Arjuna Node: 72 h of event clips + metadata. Mobile NVR: 72 h of all channels; event clips protected. Camera SD: 7 days. NVR: 30 days.
  3. Replay order is oldest first, per site, rate-limited. Replay uses at most 30 % of the link so live traffic keeps its budget; a site with a 72 h backlog over a 200 Mbps wireless link drains in well under an hour because only events and clips are replayed, never continuous footage.
  4. Idempotent ingest. The Event Engine upserts by event ID; the storage layer de-duplicates clips by hash. Replaying twice is harmless.
  5. Continuous footage is fetched on demand only. If an investigation needs main-stream video from an isolation window, the operator selects the range and the core pulls it via ONVIF Profile G from the NVR — the same mechanism used every day for evidence export.
  6. Operators see the backlog. Camera Health shows per-site buffer fill %, oldest pending event, and replay progress. A buffer above 60 % raises a ticket so the link problem is fixed before the buffer overflows.

5. Detection: the monitoring that makes the above real

SignalSourceIntervalAmberRedAction
Camera RTSP keep-aliveAdapter / Edge Gateway5 s30 s missed90 s missedReconnect loop; ticket at red
Frame rate per streamStream Manager10 s< 70 % of expected< 30 %Mark degraded; QoS check
Packet loss / latency probeEdge Gateway → core10 s> 1 % / > 50 ms> 3 % / > 150 msWireless degraded state
Edge health beaconEdge Gateway, Edge AI, Mobile NVR10 s30 s missed60 s missedSite isolated / vehicle out of coverage
NVR recording checkCore → NVR (Profile G)1 hGap in last hourGap > 15 minTicket
RAID / disk SMARTNVR, storageSNMP trapPredictive failureDisk failedTicket
GPU worker heartbeatAI Scheduler5 s15 s missedRe-assign streams
Kafka consumer lagMessage Bus30 s> 30 s> 5 minBus HA check
Storage capacityStorage5 min80 %90 %Early expiry of non-evidence
Buffer fill %Edge AI, Mobile NVR1 min60 %85 %Ticket to fix the link
UPS stateCore, cabinetsEventOn battery< 10 min leftClean shutdown sequence

Every red state creates a ticket automatically (Reports + APIs → ITSM webhook) with the component, location, first-seen time and the runbook link.


6. Assumptions to confirm during site survey