4 ms·
I mean I can understand why they dropped websql, as great a project as SQLite is, mandating that browsers expose SQLite is not a spec, and expecting a complete
by masklinn 5y ago
I mean I can understand why they dropped websql, as great a project as SQLite is, mandating that browsers expose SQLite is not a spec, and expecting a complete reimplementation of sql by browser developers would be foolish.
But yeah the assertion that indexeddb is any good is hardly convincing.
Nowadays you can use sqlite3 through wasm if you want, though I don’t know how you’d handle the persistence layer.
- tehbeard 5y ago> Nowadays you can use sqlite3 through wasm if you want, though I don’t know how you’d handle the persistence layer. There was a post on here in the last month or 2, atleast for reading, that used http range headers for reading the db pages. as for writing, you're gonna hate this, but a vfs impl. for SQLite using indexedDB as the backing store is your best option (Safari stupidity not withstanding)
- masklinn 5y ago> There was a post on here in the last month or 2, atleast for reading, that used http range headers for reading the db pages. That was for a local SQLite doing remote loads/stores, I was thinking more local loads/stores, what websql would have provided. > as for writing, you're gonna hate this, but a vfs impl. for SQLite using indexedDB as the backing store is your best option (Safari stupidity not withstanding) Yeah that’s what I was figuring out but then it feels like the SQLite bits are significantly less useful, and I’m not sure how good indexeddb is at being a block device.
- int_19h 5y agoYou can still mandate a spec, and if everybody ends up picking SQLite to implement it, so what?
- masklinn 5y agoIf you write the spec to be compatible with SQLite and everyone picks that, then you have in essence mandated SQLite and your spec is at the mercy of the project’s decisions. If you write the spec to not be compatible with SQLite then every browser has to implement its own SQL layer which is a huge effort and frankly a waste because SQL is kinda shit.
- hajile 5y agoSQLite is open source. If it goes away from the direction you want, then fork it. That's still way less effort than implementing a bunch of different IndexedDB variants.
- otabdeveloper4 5y ago"Just use SQLite, lol" is not a spec. P.S. SQLite doesn't have a spec. Once you start really using it and bumping into version differences, extensions, etc., you'll really feel the pain caused by this.
- int_19h 5y agoI didn't say that it is. But you could make a spec that is implementable using SQLite. And no, it's not the same as mandating SQLite.
- otabdeveloper4 5y ago> But you could make a spec that is implementable using SQLite. Yes, that would be the smart choice. But alas.
- brigandish 5y agoWhy do you care more about this mythical spec - which clearly is s load of rubbish if IndexedDB is anything to go by - versus a working, powerful technology that is as close to being able to be dropped in quickly as one could hope for?
- otabdeveloper4 5y ago> working Not after Google and Apple get their hands on it.
- aseipp 5y agoYou can try to language-lawyer this as much as you want, but it doesn't matter; Browser developers clearly do not want to just adopt SQL into the browser layer without there being multiple independent implementations, and scoping the problem so that you can act all "whoops, wow, what did I trip over right here? so convenient!" to use SQLite and be done with it, is a tactic they almost certainly can predict and see as a bad one, nearly equivalent to just mandating it in the first place. Like, does anybody here really think their actual complaints are about some minutae about wording in a spec about "mandates" or whatever? Their rejection is quite clearly against the spirit of the design, and again because because they don't think multiple browsers each independently reproducing a whole SQL stack with equivalent semantics is viable. It's not about technical nits or wordsmithing, little coder-logic-tricks aren't going to work.
- brigandish 5y ago> Browser developers clearly do not want to just adopt SQL into the browser layer Why would they think it’s more viable as a JavaScript spec than a SQL one? It seems to me it’s about retaining control and about giving what some web devs want - JavaScript everywhere.