←back to thread

Sqlite3 WebAssembly

(sqlite.org)
506 points whatever3 | 5 comments | | HN request time: 0.61s | source
1. jjcm ◴[] No.41851916[source]
As a general question, in what scenarios is it more beneficial to send the full DB and let the browser handle the queries? Maybe phrased a better way - when would I use this to improve a user experience over the traditional server-hosted db model?
replies(4): >>41851976 #>>41851993 #>>41852807 #>>41855888 #
2. bryanrasmussen ◴[] No.41851976[source]
>when would I use this to improve a user experience over the traditional server-hosted db model?

just my intuition when I read the headline of this post - something like the interplay between PouchDB and CouchDB for offline first apps

https://medium.com/offline-camp/couchdb-pouchdb-and-hoodie-a...

3. harrisi ◴[] No.41851993[source]
For offline use it can be good when dealing with large amounts of data. Anything from like an audio library to 3D modeling software. Changes can be made locally and persisted and then you can sync things server side regularly or when online again.
4. ThatPlayer ◴[] No.41852807[source]
Personally I'm using it for a statically hosted website, so a server-hosted database was never an option. Also with the right driver, it's possible to stream the chunks of the database as needed rather than sending the full database: https://github.com/mmomtchev/sqlite-wasm-http

I can even do Sqlite's full text search without downloading the entire FTS database. Just most of it, if the search term is short enough.

5. pdyc ◴[] No.41855888[source]
i am creating host of dashboards which directly talk to different services with very little data on my own server that is used for access control and token management only so actual data never comes to my servers. This kind of app is a good candidate for client side embedded db.