Skip to content
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

NativeIO: Plumbing and minimal functionality. #22212

Merged
merged 1 commit into from Mar 25, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 12, 2020

This is a scaffolding CL for NativeIO, a.k.a. Low-Level Storage. Most
details will probably change over time, but the overall architecture is
intended to be stable. To facilitate review, this CL aims to introduce
enough aspects of the API for readers to reason about IPC security and
general architectural concerns in the browser and in Blink.

The summary below is also intended to facilitate review.

  • NativeIO introduces new per-origin storage. The per-origin model
    matches other existing storage APIs, so no new permissions are added.
  • NativeIO storage is structured as files in a flat per-origin
    namespace. Files are stored in a per-origin directory under the user's
    profile.
  • The browser-side implementation enforces access control at the file
    level. Once a renderer is allowed to open a file, the browser passes
    the file descriptor to the renderer. This approach aims to minimize
    the latency of I/O operations.
  • The renderer exposes two API flavors to web pages -- an asynchronous
    version and a synchronous version. The latter is only available in
    dedicated workers. The goal is to allow developers to experiment with
    both flavors of the API, and report back on performance and stability.
  • In the asynchronous API, all file I/O is done on tasks posted to
    Blink's worker thread pool. This avoids jank on the main thread, at
    the cost of two thread hops per I/O operation.

This CL adds two READMEs with some minimal information.

  • //third_party/blink/renderer/modules/native_io/README.md
  • //third_party/blink/web_tests/external/wpt/native-io/README.md

An API explainer is available at
https://github.com/fivedots/nativeio-explainer

Binary-Size: New Web Platform feature. Fugu P1.
Bug: 914488
Change-Id: I2c8c794837c5332d81bfbab2ed0827e1f26f7cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093918
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753327}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2093918 branch 9 times, most recently from 6310943 to 98a7be9 Compare March 22, 2020 21:16
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2093918 branch 2 times, most recently from cfe38f7 to c92d228 Compare March 24, 2020 21:56
This is a scaffolding CL for NativeIO, a.k.a. Low-Level Storage. Most
details will probably change over time, but the overall architecture is
intended to be stable. To facilitate review, this CL aims to introduce
enough aspects of the API for readers to reason about IPC security and
general architectural concerns in the browser and in Blink.

The summary below is also intended to facilitate review.

* NativeIO introduces new per-origin storage. The per-origin model
  matches other existing storage APIs, so no new permissions are added.
* NativeIO storage is structured as files in a flat per-origin
  namespace. Files are stored in a per-origin directory under the user's
  profile.
* The browser-side implementation enforces access control at the file
  level. Once a renderer is allowed to open a file, the browser passes
  the file descriptor to the renderer. This approach aims to minimize
  the latency of I/O operations.
* The renderer exposes two API flavors to web pages -- an asynchronous
  version and a synchronous version. The latter is only available in
  dedicated workers. The goal is to allow developers to experiment with
  both flavors of the API, and report back on performance and stability.
* In the asynchronous API, all file I/O is done on tasks posted to
  Blink's worker thread pool. This avoids jank on the main thread, at
  the cost of two thread hops per I/O operation.

This CL adds two READMEs with some minimal information.
* //third_party/blink/renderer/modules/native_io/README.md
* //third_party/blink/web_tests/external/wpt/native-io/README.md

An API explainer is available at
https://github.com/fivedots/nativeio-explainer

Binary-Size: New Web Platform feature. Fugu P1.
Bug: 914488
Change-Id: I2c8c794837c5332d81bfbab2ed0827e1f26f7cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093918
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753327}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants