Comments (4)
The name
field is meant for convencience only and is a human readable name of the document (just like description
). I think the resourceId is part of the actual resource which is located in the protocol object.
from ocm-api.
In reality “name” should be a unique identifier of the resource in the scope of owner and providerid. It should not be a filename or path as such (although it could be if unique).
For whom should it be unique? We could only guarantee uniqueness for the sender, not for the recipient. Also to ensure uniqueness for the sender we would need to track the "names" we already send before to make sure to generate unique names for the new shares. This results in additional overhead and at the moment I don't see the benefits.
With respect to the "old" API, the name was considered to be the name of the resource (file or folder). I think it also makes a lot of sense to send the name directly with the share request. Otherwise you would need to ask the sender again for the resource name. In case of webdav this could be a propfind, if we want to support other file transfer mechanism in the feature we don't know if and how this will be possible. In any case it would add a lot of extra work to the programmer who implements our API to implement a "retrieve resource name" for any possible file transfer mechanism, we would have additional overhead (an additional request) and the risk that a future file transfer mechanism doesn't know the concept of a (useful) resource name but only transfers the payload. Therefore at the moment I think sending the name of the resource directly with the share request makes a lot of sense.
from ocm-api.
For whom should it be unique? We could only guarantee uniqueness for the sender, not for the recipient. Also to ensure uniqueness for the sender we would need to track the "names" we already send before to make sure to generate unique names for the new shares. This results in additional overhead and at the moment I don't see the benefits.
This problem arises in your implementation, your implementation needs to check for unique file target names, resulting in a O(n) complexity. Our implementation is O(1) as we do not require to consult previous state to create a unique file target names for the recipient namespace.
With respect to the "old" API, the name was considered to be the name of the resource (file or folder). I think it also makes a lot of sense to send the name directly with the share request. Otherwise you would need to ask the sender again for the resource name. In case of webdav this could be a propfind, if we want to support other file transfer mechanism in the feature we don't know if and how this will be possible. In any case it would add a lot of extra work to the programmer who implements our API to implement a "retrieve resource name" for any possible file transfer mechanism, we would have additional overhead (an additional request) and the risk that a future file transfer mechanism doesn't know the concept of a (useful) resource name but only transfers the payload. Therefore at the moment I think sending the name of the resource directly with the share request makes a lot of sense.
The solution @moscicki proposed is to have a new field called basename for the "name of the resource" and still have a resourceid that uniquely identifies the share object.
Another solution is to encode both in the name field: fileid=1234,name=/My Share
but I think is cleaner the previous solution.
from ocm-api.
I don't really understand the problem. I think the implementer should use it's own identifier(s).
from ocm-api.
Related Issues (20)
- Activate GitHub Pages feature on this repo HOT 4
- [chore] Staging area for open PRs HOT 1
- NewShare field 'permission' is required but not defined HOT 1
- Document meshProvider field in NewShare HOT 3
- Endpoint discovery through https://example.com/ocm-provider/ HOT 4
- Group-owned shares and invites to/from groups HOT 3
- RFE: make invitation workflow symmetric HOT 1
- Cannot specify options per protocol in create share endpoint
- "protocol" or "protocols", which should implementers use? HOT 6
- Describe how "sharedSecret" may be used in WebDAV protocol HOT 3
- Do we want to support more than one protocol at a time? HOT 7
- Apply for funding to help develop Open Cloud Mesh within this community HOT 9
- Backwards compatibility HOT 5
- Document current translation that happens for webdav HOT 13
- support sub-shares? HOT 1
- Framing in terms of OAuth HOT 4
- Trade in shared secret for an OAuth-grade refresh/access token? HOT 4
- Security Considerations, from OSW session about RAP and comparing with CIBA-PUSH HOT 1
- Sequence Diagrams
- Why use refresh tokens?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocm-api.