whatwg / fs

File System Standard
https://fs.spec.whatwg.org/
Other
225 stars 19 forks source link

Consider renaming " the Origin Private File System" in anticipation of Storage Buckets #92

Closed a-sully closed 1 year ago

a-sully commented 1 year ago

The Storage Buckets API (see https://wicg.github.io/storage-buckets/explainer) will allow sites to partition their storage into a number of buckets. Each storage bucket will store data associated with established storage APIs such as IndexedDB, CacheStorage, and, you guessed it, File System. Soon, a site may have multiple instances of "the Origin Private File System."

Should we change the name of the OPFS to reflect this? If so, does anyone have suggestions? Or does the OPFS name have enough behind it that changing it would be more confusing to developers than leaving things as they are?

At the very least, we could change "the Origin Private File System" to "an Origin Private File System"? "Private" doesn't necessarily imply exclusivity... Sure, "Origin" is technically no longer correct, but maybe that distinction doesn't actually matter?

inexorabletash commented 1 year ago

"Sandboxed" is the generic adjective that comes to mind. I'll see if I can dig up where we ended up with OPFS...

a-sully commented 1 year ago

Yeah I think it may have at one point been referred to as the "sandboxed file system" in the spec, since the 3. Accessing the Origin Private File System header has the following link: https://fs.spec.whatwg.org/#sandboxed-filesystem

inexorabletash commented 1 year ago

Hmmm, https://github.com/WICG/file-system-access/pull/199 moved explicitly away from "sandboxed"...

mkruisselbrink commented 1 year ago

https://github.com/WICG/file-system-access/pull/174#discussion_r410367052 is the comment where @inexorabletash suggested the current name instead of sandboxed.

mkruisselbrink commented 1 year ago

Although to be fair, that was more a comment about the javascript API (which changed since then anyway) rather than the spec language.

inexorabletash commented 1 year ago

Nice digging! And yeah, that explains why we avoided "Sandboxed" there - just wanting to not enshrine that term in the API itself without further discussion. So... no strong reason to not use the term if we want it for describing the concept.

asutherland commented 1 year ago

I would strongly suggest avoiding using the term "sandbox". It has a very specific meaning in the HTML and CSP space that is distinct from OPFS' characteristics. I believe there is also a browser vendor using the term "Privacy Sandbox" recently that also seems to be distinct from OPFS and could result in confusion.

annevk commented 1 year ago

Perhaps "Local File System" to mimic localStorage? Never mind, too confusing with the end user's file system.

(Default) Bucket File System? (As per https://storage.spec.whatwg.org/#model.)

asutherland commented 1 year ago

(Default) Bucket File System? (As per https://storage.spec.whatwg.org/#model.)

I really like this! It leverages the containment metaphor of the model well, which helps avoid the ambiguity that @a-sully pointed out exists in the first comment for OPFS.

Specifically, it seems like it can be read as:

  1. Correct: A file system that goes in a bucket.
  2. Incorrect: A file system that holds buckets. Even if the reader has never read https://storage.spec.whatwg.org/#model this seems like it would seem like the less likely parse and the reader would hopefully abandon this interpretation. However, once they have read https://storage.spec.whatwg.org/#model and seen the nice diagram I think it should be more clear.

I also think using the "bucket" term here is much better than using the "bottle" term. From my perspective, the non-bucket terms exist to be unambiguous with an inherent containment relationship, but in general the only term that we really want content authors to know about are buckets. (Also, bottle can regrettably have alcohol-related connotations, which is another reason to limit its use to an unambiguous term in the spec.)

a-sully commented 1 year ago

(Default) Bucket File System? (As per https://storage.spec.whatwg.org/#model.)

I really like this! It leverages the containment metaphor of the model well, which helps avoid the ambiguity that @a-sully pointed out exists in the first comment for OPFS.

Sounds good to me! Unless there's any objections, I'll put up a PR to change this in the spec soon

I also think using the "bucket" term here is much better than using the "bottle" term. From my perspective, the non-bucket terms exist to be unambiguous with an inherent containment relationship, but in general the only term that we really want content authors to know about are buckets.

+1