Below you will find pages that utilize the taxonomy term “Backend”
Posts
Precomputing Keeps Dashboard Answers Ready in a SQLite File as the Data Arrives
Most dashboards ask the same few questions all day long: requests per endpoint, say, or this month’s usage for one customer. The usual setup recounts raw rows on every refresh, or ships every row to a hosted service that bills by the gigabyte.
Precomputing does the counting once, as the data comes in. You write a short policy that names the answers you want and says how long each level of detail should live. It compiles to plain SQLite triggers, so every INSERT keeps those answers current and reading one is a lookup. Old detail fades on your schedule; unusual events are kept whole.