whatwg / storage

Storage Standard
https://storage.spec.whatwg.org/
Other
126 stars 55 forks source link

Inconsistent relation between storage container terms and mapping #100

Open othermaciej opened 4 years ago

othermaciej commented 4 years ago

On the one hand,

A storage shed is a map of storage keys to storage shelves. (emphasis added) [1]

but:

A storage shelf exists for each storage key within a storage shed. It holds a bucket map, which is a map of strings to storage buckets. (emphasis added) [2]

and:

A storage bucket is a place for storage endpoints to store data. A storage bucket has a bottle map of storage identifiers to storage bottles.(emphasis added) [[3]] (https://storage.spec.whatwg.org/#buckets)

Why is it that a storage shed "is" a map, while a storage shelf "holds" a map, and a storage bucket "has" a map? Storage shelves and storage buckets do not appear to have any other properties besides the map. So this seems inconsistent. Why do "bucket map" and "bottle map" exist as separate concepts at all?

othermaciej commented 4 years ago

Correcting myself: it seems a storage bucket may additionally have a "mode", if it is a local storage bucket, which might explain the has-a instead of is-a relationship.

Storage shelf is associated with a "storage usage" and a "storage quota", but it's not clear if these are properties of the storage shelf, or associated with it in some external way.

annevk commented 4 years ago

We might be able to flatten storage shelf, yeah.