-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable full use of relative URLs in Solid #194
Comments
Is there something about iContainer or specifically its relative URI use that's different than how relative URIs are resolved with a base URI? As RDF 1.1 Turtle uses RFC 3986's relative resolution: https://www.ietf.org/rfc/rfc3986.html#section-5.2 , I don't see why a server wouldn't be able to process a POST's payload containing valid relative references. Ditto JSON-LD, HTML.. How is this not guaranteed to the client? Which criteria in the LDP spec limits this possibility? |
Thanks for bringing that up. I was hoping to have such a discussion on the LDP group 8 years ago. In the §5.2.3.7 of the LDP spec we find
It does not say anything about other relative URLs. In particular the client cannot know if the server would interpret Note that with LDP the server does not need to parse the content to change relative URLs. It can just create a new resource somewhere, because document relative URLs will function out of the box as indicated by the LDP spec. With an |
I do not know why 5.2.3.7 is specifically called for, but while it doesn't say more about other kinds of relative references, does it need to? Does Solid need to? Why can't a server while required to be able to parse some RDF bearing documents (re RDF 1.1 Concepts) not be equipped to resolve all valid relative IRIs in its description when producing its RDF graph? If not, wouldn't the server be using a non-conforming parser? Is the issue you want to highlight about serializing in that relative IRIs in resource description may not be preserved and that it would be useful to make sure that happens? If so, would this be better documented in non-normative text or as a best practice, eg. along the lines of https://www.w3.org/TR/ldp-bp/#use-relative-uris if anything above and beyond? |
The LDP group started off with a lot of people who did not understand the value of relative URLs, because they were mesmerized by RDF semantics being defined in terms of absolute URLs. So they thought the only thing that would be legal to <> a foaf:PersonalProfileDocument;
foaf:primaryTopic <#i> . if you are not allowed relative URLs in the Some went on to suggest that the client should name those nodes with UUIDs so that after creation they could Luckily pragmatism prevailed and it was resolved that it was possible to send documents with relative URLs to the server. The text you saw above in §5.2.3.7 is testament to that. But it was not possible to get to the next stage of the discussion - the one we we are having now - as Solid wants to specify (quite rightly) a more intuitive type of container. If you don't specify it you're left with the LDP one which does not provide the guarantees you want. So yes, Solid needs to create a subclass of ldp Containers if it wants
How does the client know what the path relative URLs (eg. Furthermore there would be no need for the server to parse content to make sure the relative URLs do the right thing with an iContainer, since that follows from the definition §5.2 of RFC 3986: Uniform Resource Identifier (URI): Generic Syntax. As a result you save yourself work on the client and on the server thereby removing a whole class of bugs whilst making the protocol a lot more intuitive. Is there a problem with that? |
btw. you don't need to specify a sub class iContainer of <> a ldp:BasicContainer, solid:Resource;
... as well as <> a ldp:DirectContainer, solid:Resource;
... I am not sure how non Container resources for solid differ from ldp yet. If they don't then |
Let me know if you discuss this on the spec meetup. So I can make time to attend. |
For an example of the types of problems that the LDP group had to surmount with relative URLS and that are it seems still alive see the recent discussion on gitter with Martynas. |
In the discussions the following question came up, which is an interesting one asked by @csarven among others:
This is interesting because it suggests that perhaps no changes are needed. It would just follow from the many other specs that this is the right behavior. The following would need to be investigated:
Here are reasons to think that this is very unlikely. Having contributed to banana-rdf -- a Scala abstraction over Java libraries such as Jena and Sesame, and over rdflib for JS -- I am pretty sure that these libraries are only written to parse rdf content with relative URLs by giving it the URL of the document from which it was fetched. But the requirement that This would need to be done across all document types (e.g. HTML) that can contain relative URLs. This seems like a lot of work and it seems very unlikely to have been implemented. |
Solid and LDP both refer to RFC 3986 for relative referencing. They are compatible in that regard. As clients assign a URI to a resource when using LDP doesn't specify URI patterns for resources when using the Solid servers' behaviour in that regard is still compatible with LDP even if only A Solid client can't fully communicate with a server that only implements LDP eg. it is possible for an LDP server implementation to assign URIs to new resources that's not compatible with Solid (re examples above). An LDP server must be specialised and extended to fulfil Solid server requirements in order to participate in the Solid ecosystem. The Solid spec currently includes normative text - which is open to improvements - that's needed for clients to both generate and parse representations using relative referencing (as per RFC 3986). This information is currently not advertised by a Solid server. I agree that a type like |
But surely, FWIW, I tested this with the old and largely obsolete It would be nice if you could try it out in these frameworks @bblfish as it should do it as normal URI resolution. |
@bblfish wrote 10 months ago
@kjetilk answered 7 hours ago:
That was exactly my point. I was saying that we need to introduce a subClass of
<.> ldp:contains <> . could end up creating a resource at So there one could just lift one's hand 🤷 and swear about LDP! (pause for swearing 🤬) But actually there is a use for the LDP behavior, that we documented in the Use Case and Requirements document in the Privacy Section under §2.6.4 Limit information disclosure through URI. A server may want to have UUID encoded names for its containers and resources so that nothing can be gleaned from the URL structure. Then if you found a document with those URLs and an Therefore my suggestion is: let us distinguish them by name, and allow for both ldp:Container and solid:iContainer :-) |
🤬 indeed! I find that discussions starting with LDP orthodoxy usually aren't very fruitful. Yet, it seems like they simply underdefined the behaviour, which makes me think that we shouldn't bother too much about it, all relative URIs must be resolved relative to the retrieval URI as per RFC 3986, which is really the only sane thing to do. It doesn't seem to break the LDP spec AFAICS, but I suppose it may break existing LDP implementations that do insane things. Whether or not that means we need a new container type then depends on the actual practice out there, it seems to me. I'm also not so sure about that use case... If your requirements are such that you cannot even expose container structure, then I would think twice about having the data on the Web at all. I would at least put it behind several protective layers that could have their own semantics... |
yes, LDP changes nothing about that and could not. The Limit information Disclosure through URI is going to be very important to sell Solid to the paranoid security community. I really want to be able to implement that and go to the Chaos Communication Congress and show Solid working with Tor, which would be very cool. So for me the "underdefined" behavior of ldp is just right there. But I also want the Solid community grow by being easy to learn, so I propose we also have an There is actually no need to oppose these two schemes, they are complementary. |
Hmmm, right. I guess a Solid-specific container would work for me :-) |
Solid Containers are based on LDP Basic Containers. Those make it difficult to use relative urls reliably when publishing a document. Indeed the only relative URLs that can reliably be used in a document
POST
ed to anldp:BasicContainer
is the "this document"<>
relative URL. The same is true with the current Solid spec, as it inherits that definition.A bit of history will help to understand how ldp got to this compromise. It was an uphill battle at the time to get relative URLs (expressed in Turtle with
<>
) to be accepted at all, as various members of the LDP Working Group (WG) claimed that RDF documents with relative URLs were not bona fide RDF document at all. It took a while to overcome that inhibition. (The main argument is thatPOST
ing is a speech/document act). Having finally reached consensus on the use of<>
to refer to the newly created document, members of the WG did not want to go further for fear of loosing what they had achieved.Over 7 years have passed and I think everyone is quite happy now with relative URLs. Indeed the Solid spec show a desire to go further (as shown below). We can make publishing documents a lot easier by also allowing URLs to be published containing any relative URL even ones linking up the hierarchy with `<../>. For people publishing HTML documents this would allow them to edit files locally and to publish those as they appear on their file system, with as little transformation as possible needed. It would also make it easier to publish new formats without the server or client needing to parse documents to absolutize relative URLs.
This would easily be feasible by creating a new type of Container. In a proposal from 2012 I called these intuitive Containers
iContainers
. Of course nothing in this argument hangs on the name. Here is what I wrote in issue 50: Intuitive Containers: better support for relative URIs in 2012:So how does this apply to the current Solid Spec? Currently in §2.4.1 Shared slash semantics it is written that:
The problem with this is that this is not guaranteed by any of the ldp Containers. In order to allow this behavior to be explicit and so for there not to be clashes with existing ldp implementations from IBM, Oracle, OpenLink or others, which could lead to errors in publications, Solid needs to define a subclass of
ldp:Container
with the desired properties.Furthermore there are very good use cases for the less precisely specified Containers as defined by ldp. So it would be a pitty to loose those capabilities whilst also creating difficult to debug confusion in the wider community.
The text was updated successfully, but these errors were encountered: