by hitekker · 5y ago · 0 comments
For those who are able to stomach an uncomfortable political history instead of an easy, technical answer, you can take a look at [2]. It's interesting that 7 years later, many the folks who pushed hard to get rid of SQL in favor of NoSQL seem to no longer occupy positions of prominence in the industry.
[1] https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_A...
[2] https://nolanlawson.com/2014/04/26/web-sql-database-in-memor...
Regardless of how you view it, the benefit of hindsight shows the exact thing that people warned would happen did in fact happen (a widespread venerability in SQLite exposed across various browsers). Its also a fairly strange point to be personally insulting people involved in the process whose careers are doing perfectly well.
Back in the day, there were people who strongly suggested MongoDB and IndexedDB were the future, and that PostgreSQL, MySQL, SQLite were trash. I've noticed the folks who rode that hype-train moved into other kinds of occupations that aren't exactly engineering-focused anymore.
The biggest problem is that yeah, WebSQL tends to be faster than IndexedDB. Or at least it was back when I was working on PouchDB. Biggest issue IIRC was that joins were faster in SQLite than implementing the same thing in userland on top of IndexedDB. Browsers eventually shipped getAll/getAllKeys which also helped with cursor slowness.
I haven't looked much at the Storage Foundation API [1], but it seems like a more reasonable approach moving forward. Just give developers the low-level tools and let them build SQLite on top of it. Also the Chromium devs have been working on relaxed durability, which apparently improves IDB perf in some scenarios [2] (although still not as fast as Firefox it seems [3]).
[1]: https://github.com/WICG/storage-foundation-api-explainer
[2]: https://www.chromestatus.com/feature/5730701489995776
[3]: https://bugs.chromium.org/p/chromium/issues/detail?id=102545...
> Firefox: Negative [1]
> Safari: Negative [2]
However, I fully expect Chrome to ship it in stable sometime soon, like they do with dozens of other APIs.
There are now four different half-baked storage/file api proposals, at least one of them is already in stable Chrome... it's a mess.
[1] https://github.com/mozilla/standards-positions/issues/481
[2] https://lists.webkit.org/pipermail/webkit-dev/2021-February/...
1. The API is the dogshit hot mess you'd expect for a pre promise/async API.
2. The lack of partial/computed secondary indexes.
3. Apple/Safari does EVERYTHING in their power to break it. I refuse to believe it's incompetence at this point, it's actively malicious.
Six houses, all alike in dignity, In fair IRC, where we lay our scene, From ancient grudge to new mutiny, Where civil blood makes civil hands unclean. From Oracle, that SQL seer of IndexedDB, To Google, the stronghold of search, We add Mozilla, the Web SQL killa, And Apple, peering from its mobile perch. Here, a storage war would set keys to clack, Tongues to wag, and specs to shatter, There was also Microsoft and Opera, Who don't really seem to matter.
THE PLAYERS
NIKUNJ MEHTA, of House ORACLE, an instigator JONAS SICKING, of House MOZILLA, an assassin MACIEJ STACHOWIAK, of House APPLE, a pugilist IAN FETTE, of House GOOGLE, a pleader CHARLES MCCATHIENEVILE, of House OPERA, a peacemaker
ACT 1
SCENE: A dark and gloomy day in Mountain View, or perhaps a bright and cheery one, depending on your IRC client's color scheme.