News for hackers. Stuff that matters.
Re:Hosting SQLite databases on GitHub Pages or any static fi... by OOPMan on Sunday May 02, 2021 @06:52PM (#27019791)
It's impressive on one hand.

On the other it's still a lot of overhead.

Re:Hosting SQLite databases on GitHub Pages or any static fi... by pfundstein on Sunday May 02, 2021 @07:46PM (#27020126)
I would say it's less overhead than downloading the entire db to query it locally...? What is your suggestion for accessing a static database with less overhead?
Re:Hosting SQLite databases on GitHub Pages or any static fi... by OskarS on Monday May 03, 2021 @03:17AM (#27022467)
I would bet that if you compare it to a traditional server-client database (which functionally does essentially the same thing: you send it a query over the network, and get a result back), the overhead is probably massive. This is a very clever way to cram that kind of functionality into a static hosting site, and you can imagine some uses for it, but it's clearly not a particularly efficient compared to doing it the "right" way.
Re:Hosting SQLite databases on GitHub Pages or any static fi... by Salgat on Monday May 03, 2021 @02:35AM (#27022272)
The idea is that you're weighing the pros cons vs an actual live database. This is basically only a good idea if you're having someone else paying the hosting fees.
Re:Hosting SQLite databases on GitHub Pages or any static fi... by OOPMan on Tuesday May 04, 2021 @08:12AM (#27036727)
Since it's a static database and the queries against it are most likely going to be static, just pre-run the queries and store the results statically in a more space-efficient format. When you're on a dogshit internet connection in a 3rd world country 50kb can actually be pretty unpleasant. Try rate limiting your internet to EDGE rated to see what I mean.

I'm not saying the whole thing isn't impressive, just that the concept itself is one of those "because I can" rather "because I should" things, which kinda devalues it a whole lot.

Re:Hosting SQLite databases on GitHub Pages or any static fi... by ineedasername on Sunday May 02, 2021 @08:11PM (#27020296)
For a casual or personal use case though, the alternative of running a client-server database on something like a VPS is probably more overhead than this. It's unlikely to be a very scalable option, but for use cases as described by the author it seems like a good fit.
Re:Hosting SQLite databases on GitHub Pages or any static fi... by littlecranky67 on Monday May 03, 2021 @03:35AM (#27022556)
I know of the drawbacks of the approach and wouldn't chose it for a lot of my projects, but I would say it is very scalable in those cases where I would. Put the DB on GitHub Pages for free along with your HTML/JS code and you can scale to whatever GitHub is willing and capable of delivering. Yes, your users might transfer way more data than needed but you pay nothing for it and do not have to maintain servers.

In the standard scenario for personal projects (not enterprise) I would have a small VPS/Dedicated server with a REST service running - that would be hugged to death immediately if a link would make it to some site like HN. And also, I completely share the experience of the Author that after a couple of years you have moved on, the VPS is dead etc and you don't want to invest time.

Again, before considering using solution, be sure to understand how it works and the resulting limitations or you will likely chose wrong.