read-write-web / rww-play

read write web Play
59 stars 19 forks source link

How to handle reverse linking of stamples and their childs #31

Open slorber opened 10 years ago

slorber commented 10 years ago

From http://www.w3.org/DesignIssues/CloudStorage.html

Reverse Links

In a centralized SNS, when a semantic link is made, all related parties are easily informed. When A notes that a picture P taken by B depicts person C, then B and C can be immediately notified. Because there can be site-wide indexes, it is easy to ask "Which pictures did I take", "Which picture am I in", and "Which pictures did I annotate" just a easily as "Who took/is in/annotated this picture?". The links can all run back wards as well as forwards. (There is a certain analogy with some pre-web hypertext systems)

In a decentralized system, this is not immediately the case. On the web, there are two typical solutions. One is that a central third party crawls the whole web and forms an Index, just as search engines do of text. (There is, for example, a reverse index of FOAF built by QDOS.com site). A second method is that whenever a reader traverses a link, there is an indication of the source of the link sent t the destination. This happens with HTTP via the "Referer" field. In this way an incomplete but useful set of back-links can be built up on the destination side. A third method, that proposed here, if that when the links is made, the destination site is notified in real time.


In our Stample model, stamples are containers which can have child stamples. A bit like an unix filesystem.

When you access a stample resource, you should be able to:

Imagine the following unix filesystem:

sebastien@sebastien-xps:Desktop$ tree dir1
dir1
├── dir2
│   ├── dir4
│   ├── file1
│   └── file2
└── dir3

3 directories, 2 files

When accessing dir2, you should be able to know that dir1 is the parent (which maybe also have parents), and you should be able to know that it contains dir4, file1 and file2


So what is the way to handle reverse linking? Is there some convention for LDPC based on the resource URI? I mean if URI is /dir1/dir2, then dir1 is implicitly a parent of dir2?

On some over pages I can't find anymore, TimBL mention the fact that reverse linking is useful for navigation but this duplicates the information. This means that we can have inconsistencies. dir2 can say it has dir4 as a child, but dir4 says it has dir1 as parent. How can we deal with such inconsistencies?


So according to the navigation constraints on Stample, we should think of an elegant way to create reverse linking between stamples and their childs.

Any idea?

bblfish commented 10 years ago

yes, the code should already do that. Each resource should contain a link to the parent with

<parent> ldp:created <> 

It may be better to move this relation to HTTP with a link header, rather than placing it in the body. Note: The LDP WG is about to vote on the ldp:contains relation to replace the ldp:created relation.

bblfish commented 8 years ago

Actually this is what Folder's are about as proposed in issue 37, so we should implement whatever comes from that discussion.