Web-Facing Change PSA: IndexedDB: SQLite backend

2 views
Skip to first unread message

Evan Stade

unread,
3:03 PM (2 hours ago) 3:03 PM
to blin...@chromium.org, Abhishek Shanthkumar, fer...@google.com
Contact emails
Specification
Design docs
Summary
Chromium's IndexedDB implementation is rewritten on top of SQLite, to replace the previous implementation that uses a hybrid of LevelDB and flat files. There is no change to the Web API.

This is expected to improve reliability and, to a lesser extent, performance.

For now this is applied to *new data stores*. This is step 2 of a multi-phase rollout. See the previous Chromestatus entry which tracks step 1, the rollout for in-memory i.e. incognito contexts. Step 3 will consist of migrating existing data from LevelDB stores to SQLite stores.

In this step, the first time a user visits a site, or after clearing site data, new IDB data will be stored in a backend that makes use of SQLite, but existing data stored in LevelDB is unimpacted. See Documentation link below for a list of differences to be aware of.

Blink component
Web Feature ID
Risks


Interoperability and Compatibility
Interop: this work entails a web-visible behavioral change concerning an edge case in IDB transaction scheduling. This change brings Chromium in line with Firefox and Safari. (Both new and old behavior are standards-compliant.) See demo.

Compatibility: This PSA exists primarily to warn of the risk of unintended breakage. The performance characteristics, including reliability, runtime + CPU usage, memory usage, disk access, and storage utilization will all change, to varying extents based on exact details of site usage. This could become problematic in cases where sites are operating at the limits of device abilities (e.g. a kiosk app running on extremely storage-constrained hardware).

Gecko: Shipped/Shipping Firefox uses SQLite for IndexedDB.

WebKit: Shipped/Shipping Safari uses SQLite for IndexedDB.

Web developers: No signals

Other signals:

Activation
There are already many libraries wrapping IndexedDB, and its use is widespread. However, not all sites will be able to immediately take advantage of this feature, because there is not yet a mechanism to migrate data from the implementation that uses LevelDB to that which uses SQLite. Sites that are willing and able to clear user data (such as small local caches of server-stored data) can make use of the feature immediately.

Security
All data on disk is still segregated by storage bucket (origin). Both new and old implementation are newly fuzz-tested. More details: https://docs.google.com/document/d/1IjtPSWrDFw69LbsPsWY5rATO_jAxZF7bm8IndRBBNsU/edit?usp=sharing

Debuggability
existing IndexedDB DevTools support is unimpacted

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes

Is this feature fully tested by web-platform-tests?
DevTrial instructions
Tracking bug
Estimated milestones
Shipping on desktop
150
DevTrial on desktop
148
Shipping on Android
150
DevTrial on Android
148
Shipping on WebView
150


Link to entry on the Chrome Platform Status
This intent message was generated by Chrome Platform Status.

Reply all
Reply to author
Forward
0 new messages