A Kalman Filter to Stop Bothering the Server (Or the Guilty Pleasure of Over-Engineering)
I have a menu bar app that needs to know a number. A percentage from 0 to 100. To get it, it calls a server every 30 seconds. Do the math: 30 seconds means 2 calls per minute, 120 per hour, 960 in an 8-hour workday. Almost a thousand HTTP requests per day to read a number that sometimes doesn’t change for 20 minutes. That’s not monitoring. That’s harassment. The real problem isn’t technical. It’s political. When you depend on an API you don’t control — that’s not public, that has no documented rate limits, that belongs to a company that can change their Terms of Service any given Tuesday — every unnecessary request is a risk. Not of timeout. Of getting cut off. ...