Comments (3)
LDP (5.2.3.4) doesn't specify what servers should do if client doesn't request an interaction model. So, implementations may reject or derive an interaction model by other means. As Aaron mentioned, the interaction model is unnecessary for Solid because the shared semantics of slashes in URI path and so "[p]aths ending with a slash denote a container resource."
Solid servers do not observe client's requested Link header about the "interaction model" with one exception ( solid/specification@c1aac42#diff-a9469ae9dd70007b20d4207586e2855aR145-R151 ) ie. when creating a container:
Servers MUST allow creating new resources with a
POST
request to URI path
ending/
. Servers MUST create a resource with URI path ending/{id}
in
container/
. Servers MUST create a container with URI path ending/{id}/
in container/
for requests including the HTTPLink
header with
rel="type"
targeting a valid LDP container type. Servers MUST handle
subsequent requests to the newly created container's URI as if it is a valid
LDP container type by including the HTTP response'sLink
header.
[Source]
with the intention of:
Clients who want the server to assign a URI of a resource, MUST use the POST request.
Aside: I think we can actually safely drop the server requirement for servers to include the Link header in response. The only reason that I can recall on why we kept it (for the time being?) was to have some alignment with LDP. I don't think that compatibility is significant however ie. helping only LDP-aware clients understand the interaction model of the resource made available from a Solid server.
It is impossible to have orphaned resources in Solid, so, can't delete a container without deleting its containments first. Recursive delete is put on ice as there is no consensus on how to do it.
from communitysolidserver.
A container should contain triples referencing its children. These need to be updated after deleting a child resource. Should this be the responsability of the resource store or is this another place to have a specific store with a decorator pattern?
The store should do this, as the behavior is different per store.
For a file system, those triples can be generated at runtime via ls
. A triple store might materialize them.
We might want some reusable helper object that can do such materialization, but I would recommend to do this via composition rather than inheritance. (Then the file system module could also use it, but at read time rather than at write time, how cool is that.)
Related to the previous: whoever is responsible for this needs to have a way to find the parent of a resource, I'm thinking this might be a separate class/function entirely, since the Acl handler is also going to need this?
Agreed.
A file based resource store can sort of break from the above by simply checking which files are present in a folder to generate the membership triples (although the parent function is still needed for acl then). But where is the other data besides the membership data stored of the container in such case?
A meta file, I think.
If I understand the LDP spec correctly here, a client has to add a Link header describing the type when doing the POST, thereby identifying if they're adding a resource or creating a new resource. Does this mean we should reject all POST requests without that header?
@csarven, what is the consensus on this?
What do we want to do when deleting a container? It's not required to delete the children but it could cause a bunch of invisible resources.
Also need @csarven on that one 🙂
from communitysolidserver.
If I understand the LDP spec correctly here, a client has to add a Link header describing the type when doing the POST, thereby identifying if they're adding a resource or creating a new resource. Does this mean we should reject all POST requests without that header?
Having implemented an LDP server, I find the requirement for a link header (identifying the interaction model) to be too strict -- it impedes adoption and it's usually unnecessary anyway (if I'm POSTing a text/plain
payload, why do I also need to say it's an LDP-NR?).
But while it is always completely clear when a client is explicit with a link header, what are the heuristics for the server to decide on the interaction model when a client doesn't provide one. Having shared heuristics is important here, and there is an extensive discussion here: solid/specification#128
Re: delete, the idea is to allow delete on non-empty containers. If a container has child resources, a DELETE operation would return a 409 Conflict response. The related text is in this PR: https://github.com/solid/specification/pull/188/files#diff-a9469ae9dd70007b20d4207586e2855aR224
from communitysolidserver.
Related Issues (20)
- 404 when retrieving dataset URL with encoded question mark HOT 1
- Can I cleanly delete an account from CSS HOT 1
- Incorrect case used for WebhookChannel2023 HOT 1
- Rename all WebHook* classes to Webhook* HOT 1
- Use different HTTP header parsers for different parts of the server
- Cannot dereference config files HOT 1
- Containers should not respond with `Allow: PUT` HOT 1
- Update CSS Code of Conduct HOT 2
- Use local version of activity streams JSON-LD context
- Wrong WAC-Allow header sent when requesting resource before and after login HOT 6
- Query multiple Pods by Multi threading
- Add JSON validation
- Errors when trying to import SOLID HOT 4
- Docker image not available for Apple Silicon architectures HOT 1
- Seamless Create Account Onboarding Flow HOT 7
- User running the server service process HOT 1
- ERR_INCOMPLETE_CHUNKED_ENCODING : Piped stream errored with Lock expired after 3000ms HOT 1
- New account creation does not validate input HOT 2
- Support for Range Headers HOT 1
- Something strange is happening with cache headers HOT 2
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 communitysolidserver.