-
Notifications
You must be signed in to change notification settings - Fork 28.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Embed SQLite in NODEJS CORE #29378
Comments
It would help strengthen your case if you explain why. Precompiled and WASM-ified versions of sqlite exist - you would need to argue why those aren't sufficient. Also, why sqlite and not $some_other_technology? |
I disagree personally to integrate it for various reasons, but for a security standpoint, maintenance work increasing and so on and so forth, while there is existing separated solutions. |
Hi @bnoordhuis
node-gyp based solution: Pure node applications (JS/WASM) would take advantage of not having to rely onto external building tools at the sole expense of <1M of a binary increase in the node executable. the wasm version of SQLite: it's nice, but it's slower than native and takes more memory.
Adoption scale. Being it (one of) the most installed and used library in the world with billions of users constantly (and mostly unknowingly) relying on it all the time makes SQLite one of the more robust pieces of code available. Seniority and competence of its developers: its code is clean and well documented. A pleasure to read and really simple to embed. -R |
Anecdotally there are probably more users of node who either don't use a database or use a database that isn't sqlite, than users who use sqlite. The engineering work to integrate it, figure out API guarantees, make good bindings, etc., is probably better spent optimizing the wasm builds of sqlite. |
Precompiled binaries address those pain points. Embedding sqlite harkens back to the abandoned WC3 Web SQL standard. Since no one seems to be in favor of this proposal, I'm going to go ahead and close it out. Possible alternative: explore whether it makes sense to add a web storage technology like IndexedDB to Node.js. Proposals that promote browser interop are usually better received. Keep in mind that you should also volunteer to do the work when proposing a feature if you actually want to see it happen. |
Again, no.
I remember that. To put it mildly, it was mostly a non-technical decision.
I waited some couple years to raise the issue since I knew the possible reactions. 😄
I use IndexedDB on several projects and my experience is that implementations are still quite buggy.
Volunteering was implicit. Ave atque Vale! -R |
I actually agree with this, and sqlite should be embedded in the core.
For me, node-gyp is not an option, because the best sqlite module requires me to have massive amounts of trash labelled VisualStudio on my machine, and that's almost as appalling as how far short node-sqlite3 falls compared to
So I think this should be re-opened, as even though 'not many' will use it, enough will to justify the very small increase in final size , and once the feature 'is' available, I believe many programmers will drop the primitive ways of temp and cache files. Maybe even one day the inclusion of sqlite3 into the core could help manage the mess of the |
NodeJS is close being the perfect swiss army knife of zero-admin deployable microservices and applications.
The only thing missing is a built-in database.
Adopting SQLite.h/.c and exposing it to JS will result in NodeJS being the best "batteries included" environment ever.
Encrypted versions of SQLite could be considered. At a later time.
And, no. node-gyp is not an option.
R.
The text was updated successfully, but these errors were encountered: