5 ms·
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
by CharlesW 1y ago
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.
- skeeter2020 1y agoI agree on both your main points. It's not like PB has a bunch of cruft and fat to trim. The BD of the project is very aggressive in constraining scope, which is one of the reasons it's so good. The CSV-thing feels like an academic exercise. The fact I can't open an SQLite database in my text editor is a little thin, considering many tools are lighter weight than text editors, and "reading" a database (any format) is seldom the goal. You probably want to query it so the first thing you need to do here is import the CSV into DuckDB and write a bunch of queries with "WHERE active=1"
- zffr 1y agoWhat’s the other candidate besides pocketbase?
- loeber 1y agoIn 2025, pretending that a CSV can be a reasonable alternative to a database because it is "smaller" is just wild. Totally unconscionable.
- ncruces 1y agoIn 2020 Tailscale used a JSON file. https://tailscale.com/blog/an-unlikely-database-migration https://tailscale.com/blog/an-unlikely-database-migration
- CharlesW 1y agoIf you continue reading, you'll see that they were forced to ditch JSON for a proper key-value database.
- ncruces 1y agoI know. Now see how far JSON got them. So why wouldn't you just use a text format to persist a personal website a handful of people might use? I created one of the SQLite drivers, but why would you bring in a dependency that might not be available in a decade unless you really need it? (SQLite will be there in 2035, but maybe not the current Go drivers)
- deepsun 1y agoIt's self-restriction, like driving a car not using the rear view mirror. Or using "while" loops always instead of "for" loops. It's great for an extra challenge. Or for writing good literature.
- moritzwarhier 1y agoYou didn't really answer the dependency argument though. Until the data for a static website becomes large enough to make JSON parsing a bottleneck, where is the problem? I know, it's not generally suitable to store data for quick access of arbitrary pieces without parsing the whole file. But if you use it at build time anyway (that's how I read the argument), it's pretty likely that you never will reach this bottleneck that makes you require any DBMS. Your site is static, you don't need to serve any database requests. There is also huge overhead in powering static websites by a full-blown DBMS, in the worst case serving predictable requests without caching. So many websites are powered by MySQL while essentially being static... and there are often unnecessarily complicated layers of caching to allow that. But I'm not arguing against these layers per se (the end result is the same), it's just that, if your ecosystem is already built on JSON as data storage, it might be completely unneeded to pull in another dependency. Not the same as restricting syntax within one programming language.
- SOLAR_FIELDS 1y agoI just deployed a wasm built SQLite with FTS5 enabled and it’s insane what it is capable of. It’s basically elasticsearch entirely on the client. It’s not entirely as robust as ES but it’s like 80% of the way there, and I repeat, it runs on the client side on your phone or any other SQLite supported device
- bsaul 1y agohow large is the wasm package for an empty sqlite, together with the client library to access it ?
- SOLAR_FIELDS 1y agothe standalone wasm package is 714kb
- tommica 1y agoHow large of a bundle is it? And are we talking about wikipedia stuffed into sqlite, or only a few hundred pages of internal docs?
- SOLAR_FIELDS 1y agoI'm using wa-sqlite, and the standalone wasm package is 714kb. The use case is a few hundred pages of internal docs.
- bravesoul2 1y agoFor local use cases this could be useful. Run locally. Do your thing. Edit with Excel or tool of choice. Also one less dependency.
- waldrews 1y agoThe append-only, text csv format you can concatenate to from a script, edit or query in a spreadsheet, and that's still fast because of the in-memory pointer cache, seems like a big win (assuming you're in the target scaling category).