cs3org / reva

WebDAV/gRPC/HTTP high performance server to link high level clients to storage backends
https://reva.link
Apache License 2.0
172 stars 113 forks source link

Relation between CS3 storage provider api and Reva's storage.FS interface #1813

Open michielbdejong opened 3 years ago

michielbdejong commented 3 years ago

The current CS3 storage provider api is not identical to the current Reva storage provider api. What is the (current/future) relation between the two?

michielbdejong commented 3 years ago

A (rough) comparison table:

method reva cs3
GetHome Y Y
CreateHome Y Y
Create[Dir Container] Y Y
Delete Y Y
Move Y Y
[GetMD Stat GetPath] Y Y
List[Folder Container ContainerStream] Y Y
Initiate[File]Upload Y Y
InitiateFileDownload Y
Upload Y
Download Y
List[File]Revisions Y Y
DownloadRevision Y
RestoreRevision Y
ListRecycle Y Y
RestoreRecycleItem Y Y
PurgeRecycle[Item] Y Y
EmptyRecycle Y
GetPathByID Y
AddGrant Y Y
RemoveGrant Y Y
UpdateGrant Y
ListGrants Y
GetQuota Y Y
CreateReference Y
Shutdown Y
SetArbitraryMetadata Y Y
UnsetArbitraryMetadata Y Y
CreateStorageSpace Y
ListStorageSpaces Y
UpdateStorageSpace Y
DeleteStorageSpace Y
michielbdejong commented 3 years ago

Note that InitiateDownload does exist in reva, but only in https://github.com/cs3org/reva/blob/master/pkg/sdk/action/download.go#L90 and not in the storage FS interface.

michielbdejong commented 3 years ago

Ah, I think part of the answer is that the CS3 storage provider api describes the interface of the grpc storageprovider service, which in turn wraps around a storage.FS driver. For instance, the InitiateFileUpload method in https://github.com/cs3org/reva/blob/master/internal/grpc/services/storageprovider/storageprovider.go#L327 calls the underlying InitiateUpload but has some additional checks around it that the storage provider is expected to do, but that are not specific to the storage driver.