I’m working on a project to help my wife’s website calculate ranges within a given radius of a zip code.
What this requires is a formula to get latitude and longitude from the initial zip code, then use the haversine formula to determine which zip codes are within a given range of the supplied zip code, then send those to an array of zipcodes to be used by a backend dataset.
I was going to build this into the Wix backend but kicked that can down the road in favor of a free API from ZipcodeAPI.com. They have an A+ service, so definitely check them out!
Fast forward about a month, and now I’m deep into debugging and routinely hitting my query limit with over 1000 users in the dataset, so it’s time to bring the formula home. This was easy enough, but I quickly realized that after more than 20 real seconds, (or 20000ms for the nerds among us), something else needed to be done…enter Docker Container.
I’ve flirted with the idea of containers before. Truenas Apps are built on docker containers, and I have many apps, but this is the first time I’ve had to build one from the “ground up.”
After some negotiation with ChatGPT, the app is up and running…now to get it deployed and queried via API.
I appreciate these moments where I use real problems to learn new knowledge.