cs3org / cs3apis

:arrows_clockwise: Connect Storage and Application Providers
https://buf.build/cs3org-buf/cs3apis
Apache License 2.0
53 stars 29 forks source link

How do `ocm/core` and `sharing/collaboration` relate? #150

Open michielbdejong opened 3 years ago

michielbdejong commented 3 years ago

While investigating https://github.com/cs3org/reva/issues/2148 I ran into a question:

Why is there on the one hand a cs3/ocm/core package, with:

And on the other hand a cs3/sharing/collaboration package, with:

I think that ocm/core is used by the sender and sharing/collaboration is used by the receiver of a share, but if that's really the explanation then we should probably rename them to something like ocm/sender and ocm/receiver, respectively?

labkode commented 3 years ago

When designing the CS3APIS we split the OCM sharing (called federated share) from internal sharing (cs3/sharing/collaboration).

Does it make sense?

butonic commented 3 years ago

the cs3 uses three separate sharing APIs:

At least that was the intention. It does create some friction an boilerplate, but I think keeping them separate does make sense.

ishank011 commented 3 years ago

Elaborating on @labkode's comment, cs3/ocm/core exposes unprotected endpoints to which other providers can make requests to. For example, for a share created on Surfsara, the metadata would have to be persisted at CERNBox as well. This is the CreateOCMCoreShare call

The cs3/sharing/ocm API exposes endpoints which users belonging to a given provider will call to create an OCM share. This is the CreateOCMShare call. This in turn calls CreateOCMCoreShare on the recipient share provider.

The cs3/sharing/collaboration API does not concern OCM and enables shares among local users.

michielbdejong commented 3 years ago

Ah ok, thanks! Is there a documentation page about this somewhere? If not, let's create one.

So then maybe we can rename CreateOCMShare to something like CreateOCM[Outgoing/Sent]Share and rename CreateOCMCoreShare to something like CreateOCM[Incoming/Received]Share?

The word 'Core' isn't very clear, I think.