4 ms·
> lighter than SQLite You’re concerned that a < 1 MiB library is too heavy, so you wrote a DB in TS? > easier to self-host How is something that requires a J
by sgarland 2y ago
> lighter than SQLite
You’re concerned that a < 1 MiB library is too heavy, so you wrote a DB in TS?
> easier to self-host
How is something that requires a JS runtime easier than a single-file compiled binary?
- deleted 2y ago[deleted]
- be_erik 2y agoIn the age of docker anything almost anything can be a single file binary if you don’t mind pushing gigs of data around.
- ofriw 2y agoRight. But how do you scale it?
- ofriw 2y agoHave you tried using SQLite in the browser and have it play nice with a DB in the back?
- sgarland 2y agoNo, and admittedly I misunderstood the purpose, but I don’t understand the need any better now. I’m not a frontend (nor backend) dev FWIW, I’m a DBRE. If this is meant for client-side use, that implies a single user, so there aren’t any concerns about lock contention. It says it’s optimized for read-heavy workloads, which means the rows have to be shipped to the client, which would seem to negate the point of “lighter weight.” If the purpose is to enable seamless offline/online switching, that’s legitimate, but that should be called out more loudly as the key advantage.
- ofriw 2y agoThink about the modern cloud-first architecture where you have a thick back with a complex DB, a thin client with a temporary cache of the data, and an API layer moving data between them. This is an experiment in flipping the traditional design on its head and pushing most of the computation to the client using an architecture similar to what Git is using, but for your actual application data. You get all kinds of nice byproducts from this design like realtime collaboration, secure data auditing, multiple application versions coexisting on different branches in production, etc etc. It's really about pushing the boundaries of what's possible with modern client hardware
- deleted 2y ago[deleted]
- gr4vityWall 2y agoshipping SQLite as a WASM module can increase your bundle size significantly, depending on your baseline. > How is something that requires a JS runtime easier than a single-file compiled binary? You can compile your JS to bytecode and bundle it with its runtime if you want to, getting a single-file executable. QuickJS and Bun both support this, and I think Node.js these days does as well. If you expect your user to already have a runtime installed and you're not using QuickJS, you can just give them the script as well.
- nexuist 2y agoThis is clearly intended for use in web applications so a JS runtime comes for free and the package is only 8.2kb