-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a better approach to incorporate with other specs; remove export hacks #153
Comments
Maybe implicit, but: alternately, work with the editors of those specs (hey, that's me and @saschanaz) to find a better approach, which may involve changes on both sides. I talked about this briefly with @annevk at TPAC earlier this year at a high level; it really just needs some proposals made and discussed. I hope to have more time for this in 2023 than I've had for the last year. |
Oh, and I'm not saying to wait for me to do it. Please anyone, suggestions welcome!!! |
Right, I think the model as-is doesn't work for certain use cases and this wasn't flagged when the model was designed. As such we need to make changes to better account for what SW, IDB, and WL need. I suspect it's not as simple as exporting the terms unfortunately. |
Initial stream-of-consciousness thoughts: My impression is that the current design of bottles and the proxy map is that they match the needs of Local Storage, where:
While the first should be true for all storage endpoints, for some endpoints describing their operation in terms of the second and third requires significant contortions that would make the specs difficult to understand.
At least for Web Locks and Indexed DB, one idea is that it would be easier to specify if the "thing in the bucket" for a storage endpoint doesn't need to be a bottle, but could be defined by the endpoint. And we still need a way to obtain a proxy, but that would be more abstract rather than a map. But we should require that all operations between the proxy and the endpoint need to be "in parallel". At the risk of over-specifying, I could imagine describing IndexedDB's "thing in the bucket" as a connection factory and the IDBFactory as holding a proxy; then the IDBDatabase (a database connection) and IDBTransaction (a transaction) route everything through that proxy - e.g. store.put(value, key) turns into proxy.request(dbname, transactionid, storename, PutOp, key, value). The spec could abstract some of that away with proxy wrappers for the connection and transaction. This ends up looking a lot like the implementation in Chrome, at least. Again, just initial thoughts to get the conversation going. |
cc @whatwg/storage |
It seems multiple specs are using the storage model terms without actual export.
Now that w3c/web-locks#75 is also adding references, we should
really export them(maybe find a better way to expose the model as suggested in comments) and remove those hacks. (Also filed speced/bikeshed#2410 to prevent this.)The text was updated successfully, but these errors were encountered: