News for hackers. Stuff that matters.
Re:SQLite in the browser with WASM/JS - OFFICIAL by samwillis on Friday October 28, 2022 @05:25PM (#33378123)
They aren’t working to standardise SQLite, the are working to standardise a low level block based file system api that SQLite and other database engine can use. Thats much more exciting than “standardising SQLite” for the web.

The Origin Privet File System api is going to provide the opportunity for any db engine to be used in offline first PWAs.

There is no “one size fits all” database engine, that was proved by both WebSQL and IndexedDB. The OPFS in combination with WASM is the correct solution to in browser DBs.

Re:SQLite in the browser with WASM/JS - OFFICIAL by justin66 on Friday October 28, 2022 @05:57PM (#33378475)
> There is no “one size fits all” database engine, that was proved by both WebSQL and IndexedDB.

Thanks to a few very small people, WebSQL was deprecated before it had a chance to prove anything.

Re:SQLite in the browser with WASM/JS - OFFICIAL by kevingadd on Friday October 28, 2022 @06:57PM (#33379036)
Most likely prove its utility as an attack surface and source of compatibility issues
Re:SQLite in the browser with WASM/JS - OFFICIAL by nine_k on Friday October 28, 2022 @09:03PM (#33379890)
They had a,point. Making something a standard when only one implementation of it exists is not prudent.

There was (and still is) no independent implementation of SQLite that was battle-tested even a bit.

Re:SQLite in the browser with WASM/JS - OFFICIAL by chrismorgan on Saturday October 29, 2022 @05:05AM (#33382303)
WebSQL was killed off because the direction it was heading was certain to cause major compatibility problems down the road, and no one was willing to do the work that would be required to avert that (and no one was sold that it would be worth it even at that).
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