Skip to content

Cloud Server Overview

The Backend is the ground-side counterpart to the car's Telemetry Node: a Python service (the "Telemetry Middleman") that receives the UDP CSV stream, fans it out to three destinations in real time, tracks laps independently from GPS, and exposes a web dashboard and control API. It runs in Docker alongside InfluxDB and Grafana on the pit server.

What it does

  • Ingests UDP CSV packets from the car, see Middleman.
  • Streams live to Grafana with no queueing latency, see Grafana.
  • Stores every field to InfluxDB for later analysis, see InfluxDB.
  • Forwards to Marple, per session, about once a second, see Middleman.
  • Tracks laps from GPS coordinates, with a runtime-configurable finish line, see Lap Tracking.
  • Serves a web dashboard and REST control API.

Data flow

Threads at a glance

ThreadReadsDoesDocs
activity-monitorpacket arrivalDeclares the stream active/inactiveMiddleman
udp-receiverUDP socketParses CSV, pushes to Grafana inline, fans out to 3 queuesMiddleman
influx-writerinflux_qBatches points into the telemetry bucketInfluxDB
marple-sendermarple_qFlushes to Marple once a second, per sessionMiddleman
influx-statsstats_qWrites middleman health metrics to the stats bucketInfluxDB
stats-reportercountersPrints a status table, feeds stats_qMiddleman
lap-trackeranalysis_qDetects finish-line crossings, writes lap eventsLap Tracking
web-apiHTTPFastAPI dashboard and control endpointsMiddleman

Every thread reads its configuration from one typed Config object (config.py), sourced from .env. The CSV column layout is defined once in schema.py, mirroring the firmware's CSV output; that's the only file to touch if the wire format changes. See Server Setup for deployment.

Released under the MIT License.