Seems like a useful addition to the API. LGTM1
On 11/29/23 11:17 AM, 'Ajay Rahatekar' via blink-dev wrote:
[email protected]
On Wednesday, November 29, 2023 at 8:18:04 AM UTC-8
[email protected] wrote:
Can you please tick all the review boxes in the Chrome status entry?
On Monday, November 27, 2023 at 8:19:42 PM UTC+1 [email protected]
wrote:
Contact emails
[email protected], [email protected]
Explainer
https://github.com/whatwg/fs/blob/main/proposals/MultipleReadersWriters.md
<https://github.com/whatwg/fs/blob/main/proposals/MultipleReadersWriters.md>
Specification
https://github.com/whatwg/fs/pull/151
<https://github.com/whatwg/fs/pull/151>
Summary
Currently, only one FileSystemSyncAccessHandle may be open at
a time per file, preventing an origin from reading and writing
to the same file from multiple tabs easily. Conversely,
multiple FileSystemWritableFileStreams can be simultaneously
open, letting multiple writers clobber each other.
Introducing new locking modes for FileSystemSyncAccessHandle
and FileSystemWritableFileStream allows opening either
multiple readers/writers or an exclusive writer to a file
entry, depending on the application's use case.
```
handle.createSyncAccessHandle({ mode: 'read-only' });
handle.createSyncAccessHandle({ mode: 'readwrite-unsafe' });
handle.createWritable({ mode: 'exclusive' });
```
Blink component
Blink>Storage>FileSystem
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EStorage%3EFileSystem>
TAG review
https://github.com/w3ctag/design-reviews/issues/845
<https://github.com/w3ctag/design-reviews/issues/845>
TAG review status
Issues addressed
Origin Trial documentation link
https://developer.chrome.com/blog/new-dev-trial-for-multiple-readers-and-writers/
<https://developer.chrome.com/blog/new-dev-trial-for-multiple-readers-and-writers/>
Risks
Interoperability and Compatibility
Gecko: Positive
(https://github.com/mozilla/standards-positions/issues/861
<https://github.com/mozilla/standards-positions/issues/861>)
WebKit: No Signal
(https://github.com/WebKit/standards-positions/issues/238
<https://github.com/WebKit/standards-positions/issues/238>)
Web developers: Positive
(https://github.com/whatwg/fs/issues/34
<https://github.com/whatwg/fs/issues/34>)
Other signals: Emscripten plans to utilize multiple readers
and writers for performance improvement, and sites using
Emscripten will be able to take advantage of this integration.
WebView application risks
Does this intent deprecate or change behavior of existing
APIs, such that it has potentially high risk for Android
WebView-based applications?
None
Debuggability
Feature is web exposed through WebIDL changes. No additional
implementation effort is required.
Will this feature be supported on all six Blink
platforms (Windows, Mac, Linux, Chrome OS, Android,
and Android WebView)?
Yes
Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
WPTs have been added that fully test the behavior of the new
locking modes. They additionally test the interactions between
combinations of primitives, their different modes, and file
handle operations.
https://wpt.fyi/results/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.html?label=experimental&label=master&aligned
<https://wpt.fyi/results/fs/FileSystemFileHandle-cross-primitive-locking.https.tentative.worker.html?label=experimental&label=master&aligned>
https://wpt.fyi/results/fs/FileSystemFileHandle-sync-access-handle-lock-modes.https.tentative.worker.html?label=experimental&label=master&aligned
<https://wpt.fyi/results/fs/FileSystemFileHandle-sync-access-handle-lock-modes.https.tentative.worker.html?label=experimental&label=master&aligned>
https://wpt.fyi/results/fs/FileSystemFileHandle-writable-file-stream-lock-modes.https.tentative.worker.html?label=experimental&label=master&aligned
<https://wpt.fyi/results/fs/FileSystemFileHandle-writable-file-stream-lock-modes.https.tentative.worker.html?label=experimental&label=master&aligned>
Flag name on chrome://flags
file-system-access-locking-scheme
Finch feature name
FileSystemAccessLockingScheme
Requires code in //chrome?
False
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1382215
<https://bugs.chromium.org/p/chromium/issues/detail?id=1382215>
Launch bug
https://launch.corp.google.com/launch/4261043
<https://launch.corp.google.com/launch/4261043>
Estimated milestones
Shipping on desktop
121
Anticipated spec changes
Discussion: https://github.com/whatwg/fs/issues/34
<https://github.com/whatwg/fs/issues/34>
No open issues that introduce web compat/interop risk.
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5172892632875008
<https://chromestatus.com/feature/5172892632875008>
Links to previous Intent discussions
Intent to prototype:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPscNz5Oi-z6-%2BvTVyf9BNgvVnLZeQo5nfzyRhEZ_F400tTP3w%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPscNz5Oi-z6-%2BvTVyf9BNgvVnLZeQo5nfzyRhEZ_F400tTP3w%40mail.gmail.com>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/bd470b7d-4fa3-4874-a421-a2376910bc9bn%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/bd470b7d-4fa3-4874-a421-a2376910bc9bn%40chromium.org?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f7bb1aa0-2858-49eb-a361-f74560c65efa%40chromium.org.