4 ms·
I think indexedDb is just too low level for your use case. Because it’s actually very good! This low level primitive allows to implement various approaches on t
by crubier 5y ago
I think indexedDb is just too low level for your use case. Because it’s actually very good! This low level primitive allows to implement various approaches on top of it, such as the excellent Dexie.js. You should have a look at it, it made me like indexedDb
- tym0 5y agoAnother vote for Dexie, the Typescript support is alright as well.
- throw_m239339 5y ago> Because it’s actually very good! It's built on top of Sqlite in Firefox, it isn't "low level". Give me Sqlite directly instead of that horrible stuff.
- crubier 5y agoThis is an implementation detail. The fact is that indexedDB API is lower level than SQL.
- throw_m239339 5y ago> This is an implementation detail. The fact is that indexedDB API is lower level than SQL. Why do you keep on claiming that? No it is not lower level than SQL. It's trivial to implement IndexedDB on top of of a SQL database. Good luck doing the other way around and that's the whole point of things. SQlite does everything IndexedDB does and more.... indexedDB isn't lower level, it's just more basic and limited. I have yet to see a SQL database equivalent to SQlite implemented on top of IndexedDB.
- crubier 5y agoindexedDb is an API. This API is more primitive and limited than SQL. This API is basically a key value store with indices and transactions. This is what many SQL databases are implemented on top of (Postgres for example). So yes it is absolutely possible to implement a SQL database on top of indexed DB, and that would be the architecturally logical thing to do. The fact that Firefox goes the other way around is an implementation detail. What they did is called « emulation »: run a low level interface on top of a higher level one. This technique is very common and does not mean that the abstraction levels of API are suddenly magically reversed. It’s just an implementation detail of the architecture. You can run NES code in an emulator in JavaScript on the web. Does this make NES assembly higher level than JavaScript ? No.
- throw_m239339 5y ago> indexedDb is an API. This API is more primitive and limited than SQL. This API is basically a key value store with indices and transactions. This is what many SQL databases are implemented on top of (Postgres for example). SQL isn't an API. It's a language. Something to query a SQL database in the browser would constitute the API (thus WebSQL). You are mixing up language and API here. That's your first mistake. > So yes it is absolutely possible to implement a SQL database on top of indexed DB, and that would be the architecturally logical thing to do. And it's trivial to implement indexedDB over Sqlite, in fact, that's what Firefox did. Where is the other way around? Where are RDBMS implemented on top of indexedDB? > The fact that Firefox goes the other way around is an implementation detail. No it isn't. It demonstrates my point entirely, that it is trivial to implement indexedDB on top of Sqlite, which makes Mozilla developers a bunch of hypocrites for not letting developers access an Sql layer directly.
- crubier 5y agoOk, look, I disagree. I'll let you try to reconcile yourself about why "Mozilla developers are a bunch of hypocrites". I presented to you a very straightforward explanation that does not imply bad intent from an entire group of people. I am sorry that this explanation does not fit your world view. To me, what you say is the equivalent of saying « assembly is higher level than JavaScript because someone implemented a virtual machine that runs assembly code, in JavaScript in the browser ». Just because someone at Mozilla used this technique for some technical reason (it is indeed often easier to emulate low level stuff on top of high level stuff, rather than the opposite) does not change the fact that IndexedDB is an API, is not built on top of SQLite, and is lower level than any API based SQL.
- deleted 5y ago[deleted]
- hitekker 5y ago"Lower level" is a basic software engineering shorthand for minimal abstraction. https://computersciencewiki.org/index.php/Higher_level_and_lower_level_languages https://computersciencewiki.org/index.php/Higher_level_and_l... IndexedDB builds on top of SQLite, so it's considered "higher-level", not lower level.
- crubier 5y agoIndexeddb is not built on top of SQLite. IndexedDb is an API. This API is more primitive and limited than SQL. This API is basically a key value store with indices and transactions. This is what many SQL databases are implemented on top of (Postgres for example). So yes it is absolutely possible to implement a SQL database on top of indexed DB, and that would be the architecturally logical thing to do. The fact that Firefox goes the other way around is an implementation detail. What they did is called « emulation »: run a low level interface on top of a higher level one. This technique is very common and does not mean that the abstraction levels of API are suddenly magically reversed. It’s just an implementation detail of the architecture. You can run NES code in an emulator in JavaScript on the web. Does this make NES assembly higher level than JavaScript ? No.
- crubier 5y agoWhat you say is the equivalent of saying « assembly is higher level than JavaScript because someone implemented a virtual machine that runs assembly code, in JavaScript in the browser ». Just because someone used this technique for some technical reason does not change the fact that indexedDb is an API, is not built on top of SQLite, and is lower level, because you could build SQL databases on top of it.