(no title)
liamkinne | 2 years ago
The whole data set could have been zipped into a <1MB file but instead a “solution architect” go their hands on the requirements. We ended up with a slow API because they wouldn’t let us cache results in case the data had changed just as it was requested. And an overly complex webhook system for notifying subscribers of changes to the data.
A zip file probably was too simple, but not far off what was actually required.
xg15|2 years ago
If you want to get really fancy, offer an additional webhook which triggers when the file changes - so clients know when to redownload it and don't have to poll once a day.
...or make a script that sends a predefined e-mail to a mailing list when there is a change.
calpaterson|2 years ago
I completely agree and csvbase already implements this (so does curl btw), try:
justsomehnguy|2 years ago
See above. Also you can just publish the version in DNS with a long enough TTL
unknown|2 years ago
[deleted]
deeringc|2 years ago
throwing_away|2 years ago
tryauuum|2 years ago
My concern was "what if file is updated while it's mid-download" but Linux would probably keep the old version of the file until the download finishes (== until file is still open by webserver process). Probably. It's better to test
ipaddr|2 years ago
xg15|2 years ago
If the API was used rarely, that would be even more of an argument for a simple implementation and not a complex system involving webhooks.
paulddraper|2 years ago
Apache/nginx do it just fine...
pests|2 years ago
justsomehnguy|2 years ago