Re: [Specifications] Using collection to create resources vs adding members (#237)

I gave some thoughts and I see several ways of achieving it.

1. PUT whole collection (or at least list of member IRIs) - the most primitive brute force approach. In case of small collections doable, but when number of members grows it becomes unusable due to size of payload. Not recommended.
2. POST/LINK/UNLINK for creating brand new resources within the collection/attaching/detaching an _existing_ one. In this case I'd go with `hydra:expects xsd:anyUri` or `hydra:expects rdf:Resource`. The former seems ugly as it forces the client to send a barrow of literals (I intentionally didn't use a bag word), the latter feels so generic as it is vague on what server will do with the provided statements (as this is the only way for RDF) while it needs just IRIs.
  As an alternative I'd use `hydra:expects rdf:Statement` where each reified statement would say `collection is-in-relation-with member`, where that relation actually doesn't matter.
  I don't know other ways of saying _give me an IRI of a resource - it's all I care about_.
3. PATCH - hybrid between the two above, but this put's to the client in a poor situation as it would need to know on how to mint the body of a request. What would it be - set of SPIN statements? - a nightmare.

In all cases, I'd recommend using schema actions to denote an intent of the operation as the pure protocol may be not enough

-- 
GitHub Notification of comment by alien-mcl
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/237#issuecomment-832177734 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 4 May 2021 19:10:25 UTC