By the numbers
What it actually does
The problem, and the shape of the fix
Finland's grid data is public but ergonomically hostile: per-dataset IDs, sparse JSON with no analysis layer, and no caching — so naive polling from a browser hits rate limits and adds multi-second latency to every page load. ENTSO-E day-ahead prices live in a completely separate API, with XML instead of JSON and its own authentication scheme.
This backend unifies both behind one REST surface, with a write-through Redis cache tuned per-dataset (real-time data updates every ~3 minutes, so a 5-minute cache wastes at most one cycle; forecasts update once daily, so a 30-minute cache is safe and cuts upstream calls 6×) — plus an analytics layer, efficiency metrics and production/consumption differentials, that neither upstream API provides on its own.
Architecture
How data actually moves through it
consumption · production · wind · forecast
area 10YFI-1--------U
Real facts, from the repo
Not marketing copy — checkable claims
- Two independent upstream clients (Fingrid JSON, ENTSO-E XML) behind one unified REST surface.
- Redis pickle-serialized cache, per-dataset TTL tuned to each source's real update cadence.
- Redis sorted-set rate limiter enforced at the ASGI middleware layer, not per-route DI.