Live data from Hacker News

You can serve static data over HTTP

ignore.pl

41–50 of 127 posts

Re: You can serve static data over HTTP

#41
post #33

The python server is not meant for production, serving files from it is incredibly slow and resource intensive. It also is not full webserver. There are better options for serving files

Ofcourse, this was just an example. One of the prod solutions can be Nginx.

Re: You can serve static data over HTTP

#42

Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions. Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when somethi…

> glue together some massively bloated thing that they have absolutely no understanding of

Welcome to the world of npm and supply-chain hell

Re: You can serve static data over HTTP

#44
post #3

that's why I really, really hope ActivityPub or Nostr protocol could be designed as static-website compatible. But nope.

I think you should be able to to a read-only, unauthenticated implementation of ActivityPub just using ActivityStreams files.

Best as I can tell the part that might be non-compliant here is that new followers should be added to the follower collection.

Re: You can serve static data over HTTP

#47

Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions. Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when somethi…

You might not want them in your team maybe, but isn’t it really cool we reached a state where you can actually do this? Democratization of software engineering is a great good!

Re: You can serve static data over HTTP

#48
post #5

Rails, by default, will put a “.json” suffix on json routes. This is so supremely useful if you have a Rails api app, speaking to some over complicated front end that might need a quick and dirty mock for something. Just serve your /api/thing.json from somewhere. Only issue is with HTTP verbs other than GET, but usually at that point I need a lot more than this 15second mock. Good for testing little things though.

This also lends itself to easy caching with a versioning key and proxy servers, just like with static files.

…I guess that was kind of the point of REST in the first place but it’s easy to forget.

REST has a wonderful simplicity to it.

I’m yet to hear about an equivalent caching solution for GrqphQL APIs for example.

Re: You can serve static data over HTTP

#49

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…

"Make things as simple as possible, but not simpler." - Einstein (paraphrased)

Re: You can serve static data over HTTP

#50

Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions. Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when somethi…

You might not want them in your team maybe, but isn’t it really cool we reached a state where you can actually do this? Democratization of software engineering is a great good!

Dunno if it actually is democratizing software engineering. Looks more like a cargo cult to me. You get a second class of developers that don't quite get it. Not because they aren't capable, but because nobody shared the secrets with them and they had to piece together everything from flotsam.
Post reply on HN