KV storage (formerly "async local storage") is a new high-level API for an asynchronous key/value store, layered on top of IndexedDB.
Importantly, KV storage is our first experiment with shipping APIs as built-in modules, instead of putting them on the global namespace. This brings along the need for new technology for controlling built-in modules. That is where import maps comes in.
We want to run an experiment with both of these features together, as they are coupled in interesting ways which we want to gain experimental feedback on. Import maps are more interesting when a built-in module, such as KV storage, exists to use them with. And KV storage is more useful to web developers when it can be polyfilled, which import maps allows.
Link to “Intent to Implement” blink-dev discussion
Note that we will only be experimenting with the subset of import maps discussed in that Intent to Implement.
Goals for experimentation
Does the KV storage API meet developers' expectations and needs for key/value storage, enough to allow them to replace existing uses of sync localStorage or of large-ish async key/value store libraries?
Do any of the open issues on KV storage, e.g. around rate limiting or allowed key types, show up in practice when using KV storage in production?
Do import maps make it feasible to polyfill KV storage in production? (We plan to publish a basic polyfill at the start of the experiment, and invest in it more if there is developer interest.)
Is the syntax and developer experience of import maps usable and intuitive, or are there areas we could improve? (Including e.g. error messages, devtools integration, etc.)
M74 - M76
Any risks when the experiment finishes?
None. Although this is indeed an experimental storage API (which is literally the example given in the Intent to Experiment template), this API is layered on top of IndexedDB, so the data stays perfectly accessible!
In particular, a polyfill for KV storage can access the same IndexedDB databases that the built-in implementation creates, via the same API. Or, a developer could write hand-rolled IndexedDB code to access the data.
Ongoing technical constraints
Otherwise, most of the DevTools-related concerns are about import maps, and are captured in that Intent to Implement.
Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?
Link to entry on the feature dashboard
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM0wra8G1Gf5XU%3DKDSsu1%2BSotQMGvVJ0OM7aQPEdfbG%2B4Ck4hg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-RiVS1t5-uhoXCLQh3_pZ9ydZex48TaNW7pYicOn2LDA%40mail.gmail.com.