News for hackers. Stuff that matters.
Re:SQLite in the browser with WASM/JS - OFFICIAL by ilyt on Friday October 28, 2022 @11:09PM (#33380616)
> There is no “one size fits all” database engine, that was proved by both WebSQL and IndexedDB.

It was not proven at all. WebSQL was deprecated based on "we don't want to standarize on single project". IndexedDB happened because they wanted to standarize on single API (lmao), but it was just too inept.

There is no one size fits all but WebSQL fit A LOT of use cases.

Low level storage that works for DBs is interesting idea but that also means you need to ship additional megabytes of code with every app.

Re:SQLite in the browser with WASM/JS - OFFICIAL by endorphine on Saturday October 29, 2022 @01:02AM (#33381135)
Why megabytes though? Couldn't this be in the range of 100-300kb?

Also, couldn't the implementation of that storage spec. be shipped in the standard JS web APIs (i.e. by the browser)? Why would it be in every app?

Re:SQLite in the browser with WASM/JS - OFFICIAL by exelib on Saturday October 29, 2022 @03:35AM (#33381881)
Although I agree that modern web apps suffers from the size already and additional 300kb doesn't hurt in this case, but one of the most popular use cases for the client DB is the offline capability for an small footprint web app. You know, it is when your connection is poor or even absent. 300kb hurt really badly.

> Also, couldn't the implementation of that storage spec. be shipped in the standard JS web APIs (i.e. by the browser)? Why would it be in every app?

Actually, that is exactly what happens to WebSQL and IndexedDB. WebSQL got deprecated, they were not able integrate SQLite, and created IndexedDB, which is hated by many developers. Just an example: https://news.ycombinator.com/item?id=27511941