Re: Linked Data Fragments: Web-scale querying

Hi Luca,

> 1. Are the parameters standard? Do they have to be called
> `?predicate=&subject=&object=`?

Good question, I'm glad you asked because the answer is no :-)

LDF clients should be entirely hypermedia-driven,
so they should not make any assumptions about URI structure.
Instead, controls to access fragments are sent by the server,
which is then free to choose its own URI space.
The controls are entirely self-descriptive using RDF and Hydra.

Concretely, the Turtle representation of
    http://data.linkeddatafragments.org/dbpedia?object=dbpedia%3AYork
has something like this:

    <http://data.linkeddatafragments.org/dbpedia> a void:Dataset, hydra:Collection;
        void:subset <http://data.linkeddatafragments.org/dbpedia?object=dbpedia%3AYork>;
        void:uriLookupEndpoint "http://data.linkeddatafragments.org/dbpedia{?subject,predicate,object}";
        hydra:search _:triplePattern.
    _:triplePattern hydra:template "http://data.linkeddatafragments.org/dbpedia{?subject,predicate,object}";
        hydra:mapping _:subject, _:predicate, _:object.
    _:subject hydra:variable "subject";
        hydra:property rdf:subject.
    _:predicate hydra:variable "predicate";
        hydra:property rdf:predicate.
    _:object hydra:variable "object";
        hydra:property rdf:object.

So using the Hydra vocabulary, you can specify
that your server uses a different template. For instance, {?s,p,o}:

    :dbpedia a void:Dataset, hydra:Collection;
        void:subset <http://example.org/dbpedia?o=dbpedia%3AYork>;
        void:uriLookupEndpoint "http://example.org/dbpedia{?s,p,o}";
        hydra:search _:triplePattern.
    _:triplePattern hydra:template "http://data.linkeddatafragments.org/dbpedia{?subject,predicate,object}";
        hydra:mapping _:subject, _:predicate, _:object.
    _:subject hydra:variable "s";
        hydra:property rdf:subject.
    _:predicate hydra:variable "p";
        hydra:property rdf:predicate.
    _:object hydra:variable "o";
        hydra:property rdf:object.

Note how we express that rdf:predicate corresponds to the "?p" parameter.

> 2. Is there a page somewhere that describes these parameters? For
> example, how do I limit a specific set? Is there a `?limit=10`
> parameter in the standard? And how would I do pagination? Ex: is there
> `?offset=`?

So yes, any fragment describes those parameters ;-)

There are no limits or offsets.
The server is free to choose its own page length.

Paging is not yet implemented in the currently available code,
but this will be available through hypermedia controls as well.
There would simply be a link to the next page, likely hydra:nextPage.

> 3. In the paper it says "This would involve support for filters; one
> way to implement them is to offer ldfs with regular expression
> selectors. Such features would then also be indicated by a server.".
> Again, is there a standard way of doing this and does basic LDF
> enforce these rules are are they left to the server implementation?

Everything would be self-descriptive again;
server responses indicate how you can filter with regular expressions.
See the thread on the Hydra mailing list:
http://lists.w3.org/Archives/Public/public-hydra/2014Mar/0051.html

We will eventually look for ways to standardize some of these things.
For instance, we want to standardize what a basic Linked Data Fragment is,
using what kind of vocabulary its controls should be described.

However, there will never be hard-coded client/server contracts in terms of URIs.
The interaction should be driven by hypermedia;
that way, fragments can be retrieved in a server-agnostic way
(even across different servers).

> What I like about this is that it offers extra special parameters such
> as `?_page=` but also filters like:
> http://keithalexander.co.uk/ecco-tcp/?dct:date;_max=1795 using some
> special path-based language that I'm not quite familiar with.

That could indeed be another way of offering fragments;
however, this would be harder to capture with HTML forms
and harder to describe with URI templates.

> For now I'm not that interested in filters as complex as SPARQL
> FILTERs, but more interested in providing at least pagination so was
> wondering how basic LDF servers do that.

So it will be hypermedia-driven.
I will soon add this to the public codebase.

i'll keep you updated;
please do keep us updated of your progress too :-)

Best,

Ruben

Received on Friday, 21 March 2014 17:01:40 UTC