▲ | jmtulloss a day ago | ||||||||||||||||
This doesn’t make sense to me. SQLite is an embedded database, all the app code is already local to the storage. | |||||||||||||||||
▲ | oefrha 19 hours ago | parent | next [-] | ||||||||||||||||
Plus if you want to use functions inside queries, SQLite UDFs can be used from any language. E.g. for Node the better-sqlite3 binding has supported UDFs for ages; the new experimental node:sqlite also appears to have support[1][2], though I haven't used it. For Python UDFs are supported out of box. Etc. I can't see myself loading a js extension with a bundled engine exposing the same UDF capability when I can just use UDFs from the host language (which can be js with v8 already there) with access to whatever application state I want to expose, and arbitrary library code, rather than just the bare bones standard library shipped with QuickJS. What's the use case? Use rather awkward js functions in the sqlite3 CLI? [1] https://nodejs.org/api/sqlite.html#databasefunctionname-opti... [2] https://nodejs.org/api/sqlite.html#databaseaggregatename-opt... | |||||||||||||||||
| |||||||||||||||||
▲ | jmull a day ago | parent | prev | next [-] | ||||||||||||||||
Well, you can still have an app server if you want -- having app logic that runs local to the storage doesn't preclude you from also having an "app server" (that is, a place app logic runs that isn't local to the user and isn't local to the storage, but somewhere in between.) Very typically, that's how it's done with traditional client/server databases. There's no built-in "wire-protocol" for clients to connect, but there are reasonable options (it's a pretty common pattern, if fact, for systems to have a data service that provides an app-level HTTP interface to data -- so there you go, it's something you might have implemented anyway). But I think this project would help in the creation of a full/rich application data service without a need for an intermediate app tier. There are a few reasons people end up with an intermediate app-level data service, but it's starting to seem like a service based on sqlite (running local to the storage, of course) may be able to provide a decent alternative answer in many cases. I'm imagining a service light-weight enough to run as a lambda or other serverless environment (including fast cold start) which then opens up some interesting things like one-db per user and maybe user-controled host, etc. | |||||||||||||||||
| |||||||||||||||||
▲ | mikepurvis a day ago | parent | prev [-] | ||||||||||||||||
I feel like this would be more about validation and constraint enforcement than full on application functions. Given that, though, JavaScript feels like a bit of an odd choice for language. |