Ottawa.ski API beta is live!
I'm glad to say this API has finally gone pseudo 'live', with weather data provided from the OpenData initiative of the Canadian Government & my nodejs module canada-weather.
The API gateway is very simple in design. It's running tenso 4.0 which I released earlier this week, which is based on an effort to clean up the underlying turtle.io server.
Behind the API is a cron job which executes every 30 minutes to scrape weather data, and write to specific files on disk. This allows me to have the API gateway map requests to data without adding complexity; a file watcher is registered on startup, which updates the in RAM representation after a change is detected; if the file is erased the current representation is served until the server is stopped. The data sits in a Map>Map>Object structure for quick validation/retrieval/serialization.
I plan to use a similar method for the other API collections, but with a shorter polling interval.
The tenso server is kept alive with systemd, and the stdout & stderr are routed to syslog for me.
https://api.ottawa.ski

















