MAVO · 2 of 6
How an alert reaches the map
An air-raid alert goes on in Lviv oblast, and the oblast joins the official alerting API’s list of everywhere alerting at that moment. About every two minutes the producer, the half of MAVO that collects the data, fetches that whole list and compares it with the one it saw before. An area that has appeared has begun an alert. An area that has left the list has ended one, and the end is dated by the observation, because the API never announces that anything stopped. A poll that fails produces nothing at all, so a network error can never read as a clear sky.
Identifying the place is harder. Place names in the region repeat, change their endings with grammatical case and appear in both Ukrainian and Russian spellings. The program does not match names. It maps each area to its code in KATOTTG, Ukraine’s official register of administrative units, where every district has exactly one. An area the register does not contain, or holds too ambiguously to pick, is counted as unresolved and left unassigned. The two cases are counted apart, because they need different repairs.
Every district in the register carries a precomputed distance from its nearest edge to the Polish border. The nearest edge matters because an oblast can be four hundred kilometres across. A distance taken from its centre would understate how close the alert actually reaches.
Everything is written to an append-only SQLite store, deduplicated by a hash of each record’s content, so reading an unchanged state again adds nothing. From the store the producer writes four JSON files: the current picture, the last day of events, the past week as intervals for the map’s time slider, and thirteen weeks of history for the analysis page. The Polish readers and the Air Force’s tally run inside the same producer and travel in the same files. Those files are the entire interface. The public site is a separate program in a separate repository. It reads the files and imports nothing from the producer, so a breach of the site would have nothing of the producer’s to give away. The producer itself has no runtime dependencies.
Updates and errata
- erratum Ukrainian has seven grammatical cases, not six; the sentence now gives no number.