News for hackers. Stuff that matters.
Re:SQLite in the browser with WASM/JS - OFFICIAL by exelib on Friday October 28, 2022 @04:21PM (#33377328)
Key-value store would be OK, we (developers) can handle that. And in fact, we do it already. But IndexedDB is broken by design. But I agree, handle relational data is what we want. And you can easily emulate non-relation data with it, if you need.
Re:SQLite in the browser with WASM/JS - OFFICIAL by sgbeal on Saturday October 29, 2022 @01:49AM (#33381342)
> Key-value store would be OK, we (developers) can handle that. And in fact, we do it already. ... But I agree, handle relational data is what we want.

You can now have both: a relational database in your key-value localStorage:

<https://sqlite.org/wasm/doc/trunk/persistence.md#kvvfs>

:-D

Re:SQLite in the browser with WASM/JS - OFFICIAL by exelib on Saturday October 29, 2022 @03:41AM (#33381904)
localStorage suffers from issues like size limits and performance (which, probably, leads to higher battery consumption).
Re:SQLite in the browser with WASM/JS - OFFICIAL by sgbeal on Saturday October 29, 2022 @04:27AM (#33382132)
> localStorage suffers from issues like size limits and performance

Absolutely, but _it works_ and nothing trumps working code ;). A slow and space-limited database is better than none at all!

We implemented that functionality primarily to make peoples' eyes bug out ;), but also so that folks who don't yet have OPFS can have some form of persistent sqlite databases.

Re:SQLite in the browser with WASM/JS - OFFICIAL by hinkley on Saturday October 29, 2022 @03:18PM (#33387131)
The lack of guarantees about longevity put it in the realm of local cache, not buffering. If I can't count on the data to stick around then its use case is predominantly for consumption of data, not creation. We ought to pay more attention to how often we make systems whose sole purpose is for consumption.