News for hackers. Stuff that matters.
Re:SQLite in the browser with WASM/JS - OFFICIAL by boppo1 on Friday October 28, 2022 @04:13PM (#33377209)
Can you help me understand how/why this is a big change the web needs? I'm not seeing the value proposition on a database-in-a-webpage
Re:SQLite in the browser with WASM/JS - OFFICIAL by exelib on Friday October 28, 2022 @04:23PM (#33377387)
My use case is an offline-capable app. There was already WebSQL, but it got deprectaed.
Re:SQLite in the browser with WASM/JS - OFFICIAL by chasd00 on Friday October 28, 2022 @06:00PM (#33378510)
> My use case is an offline-capable app.

not trying to be snarky but do you mean a desktop app?

Re:SQLite in the browser with WASM/JS - OFFICIAL by EvanAnderson on Friday October 28, 2022 @06:15PM (#33378657)
Offline-capable apps on phones are "a thing". There are plenty of times when I have poor (or nonexistent) cellular coverage and would love web-based apps to work.
Re:SQLite in the browser with WASM/JS - OFFICIAL by hot_gril on Friday October 28, 2022 @06:18PM (#33378691)
A desktop app that's cross-platform.
Re:SQLite in the browser with WASM/JS - OFFICIAL by exelib on Saturday October 29, 2022 @03:24AM (#33381824)
Currently, it is a browser app intended to run on mobile devices. Not exactly PWA, but very similar. Later it will be, probably, packaged with capacitor.
Re:SQLite in the browser with WASM/JS - OFFICIAL by Scarbutt on Friday October 28, 2022 @04:20PM (#33377321)
For the same reason many complex desktop applications use sqlite or some other database.
Re:SQLite in the browser with WASM/JS - OFFICIAL by hochmartinez on Friday October 28, 2022 @06:30PM (#33378797)
It depends on you use case but, for example, if your db is not super large you could dowload it and use it locally istead of having to connect to an app server for every query or transaction. You could synchronize in the background with the app server. The app speed and responsiveness would be way better.

Or maybe you could use a sqlite replication tool in the browser for near realtime changes in the master node db.

And for single user apps developped with tools like Electron having your db engine in the browser makes the app faster and life easier for the dev.

Node as app server and db backend for a single user app is inefficient, slow and resource hogging.

Using Sqlite you could get rid of node and therefore, reduce memory usage, speed up app loading and execution, have a single code base in the browser that makes debugging far easier, reduce code complexity and app size, reduce cpu cycles and energy usage, save precious life time, etc... :-)