Live data from Hacker News

You can serve static data over HTTP

ignore.pl

11–20 of 127 posts

Re: You can serve static data over HTTP

#15
This technique of producing an “API” from directories of json generated by batch jobs and creative use of symlinks can be surprisingly effective. I wrote a simple program to transform a list of RSS feeds into a directory tree that I’ve been using for years as my feed reader API to great effect.

Re: You can serve static data over HTTP

#18
KISS is good... until it isn't.

At my work I struggle with the opposite: all problems are being squeezed into "let's put it into static JSON on the CDN" - which ends up with a complex custom JSON based language (schema) to support sharing information between apps, subsetting information (ie. search) etc - ie. implementing an ad-hoc one-file database. Ahh... and don't forget about complex CI/CD pipelines and Git setup that allow business users to manipulate data in these files.

I found "just use Postgres for everything" a much saner default in the end.

Re: You can serve static data over HTTP

#19

What if the data is dynamic but small and low qps? What are the current easiest projects and services for authed data CRUD? Is firebase still good?

Supabase[1] is a popular, open-source[2], and very modern alternative with a great free tier!

[1] https://supabase.com/

[2] https://github.com/supabase/supabase

Re: You can serve static data over HTTP

#20
I do this when possible. Caching can be a pain to get right though. If you’re set up to do hashed filenames for JS and CSS already, you can leverage that for cache busting your json, and then you need to inject the hashed filename into the app somehow.
Post reply on HN