W3C home > Mailing lists > Public > public-ldp-wg@w3.org > November 2012

Re: Creation of Containers

From: Richard Cyganiak <richard@cyganiak.de>
Date: Wed, 7 Nov 2012 22:14:53 +0000
Cc: public-ldp-wg@w3.org
Message-Id: <8CFE5CDC-EA44-4A2D-8EFA-9EA357A30D99@cyganiak.de>
To: Niclas Hoyer <niclas@verbugt.de>
Niclas,

Here's my (possibly flawed understanding):

On 7 Nov 2012, at 21:38, Niclas Hoyer wrote:
> is there a simple way to create a ldp container?

No, the client can't tell the server to turn a resource into a container.

The server decides what's a container, usually based on domain knowledge. A SIOC server would know that threads should be containers, and would automatically make the resource a container whenever a thread is created.

Generic servers that don't have any domain knowledge, but are “just” “dumb” graph stores, can't really use containers.

> I thought of turning a ldp resource into a container just by changing the rdf information, so if http://example.org/resource1 is a ldp resource the following HTTP request could turn the resource into a container:
> 
> PUT /resource1 HTTP/1.1
> Host: example.org
> Content-Type: text/turtle
> Content-Length: 188
> 
> @prefix dcterms: <http://purl.org/dc/terms/>.
> @prefix ldp: <http://www.w3.org/ns/ldp#>.
> 
> <http://example.org/resource1>
>    a ldp:Container ;
>    dcterms:title "A new empty container" .

The problem with this is that it doesn't tell the server where it's supposed to create new resources. A container can be POSTed to in order to create new resources, and the server needs to assign URIs to the new resources.

Perhaps the description of a container should include a URI template? Then the client could give complete instructions about the container's behaviour.

> Should we cover this in an extra use case?
> 
> A possible implementation could just start with a ldp resource. The user or client programs could create containers as they need them. I was thinking of a sioc:Thread that could also be a ldp:Container, so that other clients could reply on the thread easily.

It's an interesting use case. I can see the benefit of a setup where most clients don't need to do anything but POST fairly simple descriptions to the server.

A question though: Can't you solve it by having a sioc:Forum that is an ldp:Container that creates threads?

The very first container on the site perhaps has to be initialized by the server administrator when setting up the LDP server. Then, everything else can be created through that container. It's a bit like in a filesystem; the root already has to exist for you to be able to create new files or directories.

Best,
Richard



> 
> --
> Niclas
> 
> 
Received on Wednesday, 7 November 2012 22:15:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:11:42 UTC