Skip to content
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

Symbolic-Link header #223

Open
rimmartin opened this issue Nov 5, 2018 · 19 comments
Open

Symbolic-Link header #223

rimmartin opened this issue Nov 5, 2018 · 19 comments

Comments

@rimmartin
Copy link

Hi,

To further complete a solid server emulating a unix fie system it would need the equivalent of a symbolic link.

The server would respond to and make a container predicate a Container or Resource already predicated by some another container.

        solid.auth.fetch('https://roger.localhost:8443/public/', {
           method: 'POST'
           headers:{
            'Content-Type': 'text/turtle',
	    'Link': '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"',
            'Slug':  '<name-of-link>',
            'Symbolic-Link': '<path-to-existing-container-or-resource>'
	   }
           }).then((res) => {return res;})
        .then((response) => {callback(null);})
        .catch((error) => {callback('Error: '+JSON.stringify(error));});

The would be a resource path starting at the root or relative to the current resource.

When reading a glob back from the parent of the sym link container it would need to provide an indicator the child is a sym link.

Is there another way to do this?

@rimmartin
Copy link
Author

rimmartin commented Jul 17, 2019

ifpis object-valued, we create a directoryr/s/p, and the objectobe-comes a symbolic linkr/s/p/o→../../o, i.e., it links back to thatresource on the root level

RDF2FS – A Unix File System RDF Store

It sounds quite doable. Might need some code added to the ResourceMapper in nss

@TallTed
Copy link

TallTed commented Jul 17, 2019

For better readability --

if p is object-valued, we create a directory r/s/p, and the object o becomes a symbolic link r/s/p/o → ../../o, i.e., it links back to that resource on the root level

@elf-pavlik
Copy link
Member

How it supposed to work with Web Access Control, especially if when it gets inherited from parent containers?

It seems to me that filesystems using tree hierarchy use symlinks to have multi parent. On the other hand linked data already has native graph structure without need to denote same resource with multiple IRIs. Also if IRIs stay opaque for the clients, what benefits have creating a symlink - another IRI denoting same resource ?

@megoth
Copy link

megoth commented Jul 17, 2019

Although the file system analogy is useful in many cases, it can be a dangerous path to go down if you want the Solid server to be a facade for a Unix file system. I imagine many features will probably be problematic for servers that uses a triple store for persistent storage.

In this case, as @elf-pavlik says, how does the Symbolic Link work wrt WebACL?

@rimmartin
Copy link
Author

@elf-pavlik

I'm trying to complete the glue (https://github.com/DataDriven-CAM/solid-fs#project-progress) to isomorphic-git https://isomorphic-git.org/docs/en/plugin_fs

https://forum.solidproject.org/t/can-a-resource-be-predicated-by-more-than-one-basic-container/219/8

@megoth
https://solid.inrupt.com/how-it-works

PODs are like secure USB sticks for the Web

now that would be really handy and open up many applications

@megoth
Copy link

megoth commented Jul 18, 2019

PODs are like secure USB sticks for the Web

Important to include the whole quote when you quote something: "PODs are like secure USB sticks for the Web, that you can access from anywhere." I think the point they want to get across here is the portability of the Pod, that you can access it from anywhere. Not that Pods imitate features known from unix file systems.

@TallTed
Copy link

TallTed commented Jul 18, 2019

Not that Pods imitate features known from unix file systems

On the contrary. Everything I understand about Solid basics is that it is trying to port the Unix filesystem to the Web. I think this may need @timbl to add a few words, to set it straight for certain.

@acoburn
Copy link
Member

acoburn commented Jul 18, 2019

Everything I understand about Solid basics is that it is trying to port the Unix filesystem to the Web.

I am not sure that this is accurate. Solid, at its core, is built on top of the Linked Data Platform. There are certainly many similarities between LDP and a UNIX filesystem (esp. if you focus on basic containment), but there are also many, many differences.

If the goal was to port the UNIX filesystem to the Web, then arguably, the better choice would have been WebDAV.

@rimmartin
Copy link
Author

@acoburn @megoth @TallTed @elf-pavlik
Related topic in the forum giving insight although quite a different title:)
https://forum.solidproject.org/t/can-a-resource-be-predicated-by-more-than-one-basic-container/219

@rimmartin
Copy link
Author

LDP can do it; link data, give meaning to the linkage instead of copying data around. Basically a sym link and graph edge with attributes

@TallTed
Copy link

TallTed commented Jul 18, 2019

@acoburn -

I should have said "trying to port the Unix filesystem to the Linked Data Web" which takes you beyond WebDAV.

Whether WebDAV or LDP would have been a better starting point may be arguable but Solid did start with LDP.

And yes, LDP is very different from the Unix filesystem. Also, Solid != LDP.

@acoburn
Copy link
Member

acoburn commented Jul 18, 2019

Solid != LDP

Solid builds on LDP. Compare that to the very first normative statement in the Solid specification:

A Solid data pod MUST conform to the LDP specification

@rimmartin
Copy link
Author

Solid builds on LDP.

nss is a limited subset of LDP. All I want is to move forward with LDP which would allow more than one container to predicate a resource.

an Oct 18 reply by @timbl
https://forum.solidproject.org/t/can-a-resource-be-predicated-by-more-than-one-basic-container/219/2?u=rimmartin

@acoburn
Copy link
Member

acoburn commented Jul 18, 2019

@rimmartin I would suggest you look into direct containers. They provide a weaker sort of membership than basic containers do. NSS does not support direct containment, but it is also not terribly difficult to implement. Alternatively, you can just manage RDF properties manually:

</resource1> ex:hasSymlink </resource2> .

@rimmartin
Copy link
Author

rimmartin commented Jul 18, 2019

@acoburn yep been looking at Direct and Indirect
In nss there is te beginning of Direct
https://github.com/solid/node-solid-server/blob/master/lib/header.js#L39
a I'm trying to learn what to do at the ResourceMapper level
https://github.com/solid/node-solid-server/blob/master/lib/resource-mapper.js
where I believe the <=> fs is accomplished

@timbl
Copy link
Contributor

timbl commented Jul 19, 2019

I am undecided on this at the moment. From the acl point of view though I think the patent of the resource would be its container not thx symlink.

Questions: if the link can be to a resource on the same server — why not to any URI?

Should the server surface the link as an HTTp redirect instead of a 200?

Can we do it on the client side only by making a class of rdf object which is a soft link — and just store it in a normal file from the servers point of view?

@rimmartin
Copy link
Author

@rimmartin
Copy link
Author

https://www.npmjs.com/package/isomorphic-git
gets nearly 13,000 downloads a week with recent new version published. I'm certain there would be goodly interest where the backend was solid

@namedgraph
Copy link

A fixed hierarchy is the wrong way to think about an RDF dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants