←back to thread

Sqlite3 WebAssembly

(sqlite.org)
647 points whatever3 | 2 comments | | HN request time: 0.486s | source
Show context
parhamn ◴[] No.41852607[source]
WebSQL should've just been Sqlite and the whole offline-first (and general app storage) ecosystem would've been so much nicer.

Is there any hope of that happening? Instead of abstracting and over specifying sqlite, can the spec just specify a version of the SQLite API browsers should support and roll the version periodically?

replies(3): >>41852850 #>>41852879 #>>41861101 #
1. emn13 ◴[] No.41852850[source]
"Rolling the version periodically" is probably quite problematic for browsers. Kind of a key point of the web is that stuff if at all possible keeps working. Breaking changes like that are hard.

Even if the spec just listed occasional version and the webpage could choose which one; that means a potentially tricky maintenance burden on browser to support old versions of a potentially no longer supported sqlite, and each version is another megabyte.

Why not then just choose this solution, and let each website pick its own poison?

If the concern is the repeated downloads of common resources, well, we've accepted that for other CDN's too, and a solution for shared caching of common dependencies would in any case be more valuable than merely for sqlite.

The current approach seems better than a browser-provided version.

replies(1): >>41860067 #
2. justin66 ◴[] No.41860067[source]
Versioning was never really an issue. It's worth pointing out that Richard Hipp committed to creating and maintaining a flag in SQLite that would force SQLite to use whatever subset of SQL the WebSQL people settled on for their API. That would have of course worked independently of the SQLite version. (He also offered to write the SQL part of the spec.)

https://news.ycombinator.com/item?id=15670808

I thought the reasons given for not moving forward with standardizing WebSQL and using a SQLite implementation were (and undoubtedly still are) very, very stupid so I'm not the right person to represent them here.