3 ms·
Most uses of SQLite are client-side apps. Basically everything that's not web: from mobile apps and desktop apps to embedded software in things like cars, tvs,
by nicoburns 1y ago
Most uses of SQLite are client-side apps. Basically everything that's not web: from mobile apps and desktop apps to embedded software in things like cars, tvs, kiosks, etc. There are probably more apps using SQLite than not using SQLite for these kind of apps.
- noduerme 1y agoAre these things just running sql.js? Doesn't that use a kind of unstable webstorage instead of writing client-side files? I don't have a good handle on the state of SQLite these days as a way to store semi-permanent data on the client. In a locked-in environment or a backend I feel like it might make sense, but... isn't there like a 50Mb limit on localStorage, and how does that play nicely with a potentially larger DB...?
- nicoburns 1y ago"client" doesn't mean web. Mobile apps, desktop apps, etc are all client-side apps that can run regular SQLite. Think of apps Spotify, WhatsApp, AirBnB, Uber, etc. Not to mention mail clients, web browsers, etc. Probably 90% of non-web clients are using SQLite.
- noduerme 1y agoI'm not sure about this, I may be exaggerating, but aren't all four apps you mentioned (Spotify, WhatsApp, AirBnB, Uber) built on Electron? So they'd be using SQLite in the Node portion as their storage. That's their "server side", not client side. For that portion (the locally-run mobile backend - the middleware) I guess it would make more sense... so I see what you're saying. [Edit: Of all 4 things - Maybe only Spotify is actually an Electron app...? Although I'm confused as to how the rest could leverage NodeJS locally]
- lights0123 1y agoI would consider the entirety of one of those Electron apps to be a client since their main purpose is to interface with an external server—even if a small part of them internally is itself a server.
- beejiu 1y agoServers are things on other sides of networks. An electron app running locally is all client, whether it contains a database or not.
- jitl 1y agoSpotify used Chrome Embedded Framework (CEF) not Electron, but it’s similar in that it bundles Chrome and uses webviews to draw UI
- _joel 1y agoThere are bindings to sqlite for pretty much most languages out there. Not just webapps https://docs.python.org/3/library/sqlite3.html https://docs.python.org/3/library/sqlite3.html https://www.sqlite.org/cintro.html https://www.sqlite.org/cintro.html https://docs.rs/sqlite/latest/sqlite/ https://docs.rs/sqlite/latest/sqlite/ etc :)
- noduerme 1y agohuh. Sorry, but do some languages have SQLite bindings to some other executable? I thought that sql.js and sqlite3 in JS actually were SQLite in its entirety, running in script. You don't need to run anything else to make them work.
- _joel 1y agoThey have an interface to work with the sqlite (proper), which will be shipped alongside the application in question. sql.js is using sqlite in WASM/Emscripten, so it's pretty much analagous.