3 ms·
>I thought the whole point of SqLite is that you don't have to deal with the cruft and overhead of having to send queries over a network connection. Why tack th
by galaxyLogic 3y ago
>I thought the whole point of SqLite is that you don't have to deal with the cruft and overhead of having to send queries over a network connection. Why tack that back on?
An interesting application could be a web-application whose ONLY server is the SqLite -server. The state of the application would be stored into the SqLite database, not into "local storage" etc. Using a relational database is a great improvement in flexibility over using the key-value store of Local Storage.
Could this work? I guess we would need to load one web-page into the browser first to load some HTML and scripts and then that page could use fetch() to get everything else from the SqLite -server.
- chongli 3y agoWhat’s the security model for this? Seems like you’d end up with users able to run arbitrary queries against the database.
- galaxyLogic 3y agoGood Question. The SqLite REST-server should probably provide ways of allowing only selected operations. There's no reason why EVERYTHING should be possible over the network. One possibility could be that each user would have their own copy of the database, let them break it if they want to :-)
- johnny22 3y agoThere's also the wasm build of sqlite that you could just run directly if it's really necessary. Of course there might be performance differences