Live data from Hacker News

Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

github.com

21–30 of 135 posts

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#21
post #8

Earlier quoted context omitted.

Golang does not have built in SQLite. It has a SQL database abstraction in the stdlib but you must supply a sqlite driver, for example one of these: https://github.com/cvilsmeier/go-sqlite-bench However using the stdlib abstraction adds a lot of performance overhead; although it’ll still be competitive with CSV files.

Ok, one additional dependency to your go.mod - big deal. And by builtin I was referring to the database/sql module which was designed for this.

Most of the more common SQLite implementations for go require CGO and this is a pretty steep request, it's definitely more than a line in go.mod

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#22

CSV database is interesting; probably the most trivially-debuggable a database can possibly be. Although why not SQLite? CSV is not very resistant corruption if host crashes midway through a write.

No dependencies apart from the standard library is my guess.

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#23

Earlier quoted context omitted.

Ok, one additional dependency to your go.mod - big deal. And by builtin I was referring to the database/sql module which was designed for this.

maybe this is why they used sha-256 too, it's in the stdlib whereas bcrypt is a package (even if "official")

The standard lib has pbkdf2 though.

I'm guessing the goal is that the file can be managed more easily with a text editor and some shell utils.

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#26
post #22

CSV database is interesting; probably the most trivially-debuggable a database can possibly be. Although why not SQLite? CSV is not very resistant corruption if host crashes midway through a write.

No dependencies apart from the standard library is my guess.

Go doesn’t have sqlite in the stdlib?

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#27
post #22

Earlier quoted context omitted.

No dependencies apart from the standard library is my guess.

Go doesn’t have sqlite in the stdlib?

It doesn’t and using the standard 3rd party package requires compiling with CGO which is a pain for cross-platform :(

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#28
My biggest issue with "cheaper" alternatives is the same pathway they all take.

Start cheap, gather market, then crank the costs after lock-in.

Even "open-source" is abused. First everything is open-source, and then reasons come out for why premium services will be closed source.

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#29
Pocketbase is already the poor man's BaaS, and is minimalist compared to the two others mentioned.

> Data stored in human-readable CSVs

The choice to not use a database when two near-perfect tiny candidates exist, and furthermore to choose the notorious CSV format for storing data, is absolutely mystifying. One can use their Wasm builds if platform-specific binaries offend.

Re: Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase

#30

Earlier quoted context omitted.

Go doesn’t have sqlite in the stdlib?

It doesn’t and using the standard 3rd party package requires compiling with CGO which is a pain for cross-platform :(

theoretically there is a go port of sqlite by either using wazero[1] (wasm runtime) and then using sqlite from there or some modernc package[2](i am not sure what this website is except for the sqlite part, so maybe someone can clarify that though) There was also this wrapper of sorts to make the wazero thing genuinely easier to do and it was on r/golang but I don't remember its name but I do think it is semi popular.

[1]wazero:https://wazero.io/ [2]:https://pkg.go.dev/modernc.org/sqlite

Post reply on HN