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

Enhancement: added ListExistingReceivedShares to gateway API #228

Closed glpatcern closed 7 months ago

glpatcern commented 8 months ago

This API is to be consumed by:

The idea is to incorporate in the gateway the current logic implemented (and duplicated) in other layers, where after ListReceivedShares one has to Stat each of them to validate it exists and get all necessary metadata to send the response (in the form of LibreGraph or OCS). This logic is to be implemented by the Gateway instead, which can incorporate any caching logic as needed.

glpatcern commented 7 months ago

@labkode @diocas : having discussed with @gmgigi96 I think it makes sense to have this before we go live with the Spaces implementation, as the LibreGraph API does not cache the list of shares (that is currently implemented by the OCS layer only). It shouldn't be a big development but rather a code refactoring, where we move the code within the Gateway - the LibreGraph part is very simple, the OCS part a bit less but provided we agree on this API, I can look into it (I may need some help on the OCS part from @labkode).

labkode commented 7 months ago

@glpatcern much better now! I don't understand the logic of moving it to the Spaces part unfortunately, the idea is to have an implementation in the gateway and adapt the upper clients, the caching can then be done at the gateway level so there is no need to modify OCS/Libregraph (just removing caching code).

glpatcern commented 7 months ago

I don't understand the logic of moving it to the Spaces part

Bad wording, I rephrased my comment. Indeed the whole idea is to have the gateway encapsulate all the business logic and caching. This goes also along the lines of what we discussed with @butonic at CS3 a few weeks ago: OCS and LibreGraph would be a minimal translation layer (so code has to be removed) in front of the gateway.