Intent to Prototype: Multiple Readers and Writers in File System Access API

172 views
Skip to first unread message

Daseul Lee

unread,
May 19, 2023, 7:38:16 PM5/19/23
to blink-dev, Austin Sullivan, Nathan Memmott, chrome-storage-team

Contact emails

ds...@chromium.org


Explainer

https://github.com/whatwg/fs/blob/main/proposals/MultipleReadersWriters.md


Summary

Currently, only one FileSystemSyncAccessHandle may be open at a time per file, preventing an origin from reading the same file from multiple tabs easily. Conversely, multiple FileSystemWritableFileStreams can be simultaneously open, letting multiple writers clobber each other.


We are prototyping new “create” modes for FileSystemSyncAccessHandle and FileSystemWritableFileStream that allow 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.createWritable({ mode: 'exclusive' });

```


Blink component

Blink>Storage>FileSystem


TAG review

https://github.com/w3ctag/design-reviews/issues/845


TAG review status

Pending


Risks



Interoperability and Compatibility


Gecko: Positive with regards to allowing multiple FileSystemSyncAccessHandles. Stance on the shape of this specific proposal is not yet known.


WebKit: Positive with regards to allowing multiple read-only FileSystemSyncAccessHandles. Stance on the shape of this specific proposal is not yet known.


Web developers: Positive (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.




Debuggability

N/A


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?

Not yet


Flag name

FileSystemAccessMultipleReadersWriters


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1382215


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5172892632875008


This intent message was generated by Chrome Platform Status.


Reply all
Reply to author
Forward
0 new messages