Terminology
Communication is hard. And clear communication is even harder. You may encounter the following terms throughout the documentation, in the code or when talking to other developers. Just keep in mind that whenever you hear or read storage, that term needs to be clarified, because on its own it is too vague. PR welcome.
Logical Concepts
Resources
A resource is the basic building block that oCIS manages. It can be of different types:
-
an actual file
-
a container, e.g. a folder or bucket
-
a symlink, or
-
a reference which can point to a resource in another storage provider
References
A reference identifies a resource. A CS3 reference can carry a path and a CS3 resource id. The references come in two flavors: absolute and combined. Absolute references have either the path or the resource id set:
-
An absolute path MUST start with a
/. The resource id MUST be empty. -
An absolute resource id uniquely identifies a resource and is used as a stable identifier for sharing. The path MUST be empty. Combined references have both, path and resource id set:
-
the resource id identifies the root resource
-
the path is relative to that root. It MUST start with
.== References
A reference is a logical concept that identifies a resource. A CS3 reference consists of either:
-
a path based reference, used to identify a resource in the namespace of a storage provider. It must start with a
/. -
a CS3 id based reference, uniquely identifying a resource in the namespace of a storage provider. It consists of a
storage provider idand anopaque id. Thestorage provider idmust NOT start with a/.
|
The |
Storage Drivers
A storage driver implements access to a storage system:
It maps the path and id based CS3 references to an appropriate storage system specific reference, e.g.:
-
eos file ids
-
posix inodes or paths
-
deconstructed filesystem nodes
|
Proposed Change Another aspect for the Technically, this means that every storage driver needs to have a map of a
|
Technical Concepts
Storage Systems
A storage provider manages multiple storage spaces by accessing a storage system with a storage driver.
Storage Space Registries
A storage spaces registry manages the namespace for a user
Storage Spaces
A storage space is a logical concept:
-
It is a tree of resourcesresources
-
With a single owner (user or group),
-
A quota and permissions, identified by a
storage space id.
Examples would be every user’s home storage space, project storage spaces or group storage spaces. While they all serve different purposes and may or may not have workflows like antivirus scanning enabled, we need a way to identify and manage these subtrees in a generic way. By creating a dedicated concept for them this becomes easier and literally makes the codebase cleaner. A storage space registry then allows listing the capabilities of storage spaces, e.g. free space, quota, owner, syncable, root etag, upload workflow steps, …
Finally, a logical storage space id is not tied to a specific storage provider. If the storage driver supports it, we can import existing files including their file id, which makes it possible to move storage spaces between storage providers to implement storage classes, e.g. with or without archival, workflows, on SSDs or HDDs.
Shares
To be clarified: we are aware that _storage spaces may be too 'heavyweight' for ad hoc sharing with groups. That being said, there is no technical reason why group shares should not be treated like storage spaces that users can provision themselves. They would share the quota with the users home storage space and the share initiator would be the sole owner. Technically, the mechanism of treating a share like a new storage space would be the same. This obviously also extends to user shares and even file individual shares that would be wrapped in a virtual collection. It would also become possible to share collections of arbitrary files in a single storage space, e.g. the ten best pictures from a large album._
Storage Systems
Every storage system has different native capabilities like id and path based lookups, recursive change time propagation, permissions, trash, versions, archival and more. A storage provider makes the storage system available in the CS3 API by wrapping the capabilities as good as possible using a storage driver. There might be multiple storage drivers for a storage system, implementing different tradeoffs to match varying requirements.