RDFa API fundamentals

Mark Birbeck wrote:
> Also, I've always viewed a store as a standalone object that manages a
> number of graphs via some particular storage medium. So one store
> might just use JavaScript arrays, another store might use the HTML 5
> local storage API, and yet another store might just be an interface to
> a SPARQL/SPARQUL end-point. Within each of those stores you need one
> or more graphs, since they will all be using the same storage medium,
> and any queries to the store will need to be applied to all of the
> available graphs.
> 
> (Another way to look at it is that the store provides a 'context'.)

Mark,

I'm extremely glad you've said this! as I've approached this from an 
entirely different angle, the Store you describe is how I think of 
tabulators IndexedFormula, what I would describe as a persistent store, 
and what I've understood to be referred to when we speak of the 3rd API 
which we aren't defining.

The Store I've been thinking of, and indeed the direction I've been 
trying to point the full API in, is a Store which is nothing more than a 
sequence<RDFTriple> or in javascript terms a subset of an `Array of 
RDFTriple` - a very lightweight interface which represents a set of 
triples which can be thrown about between interfaces. Where store.filter 
returns a new store (set of triples) and where the same store can be 
thrown in to a parser to have more triples added, where stores can be 
merged together via store.import and where sets of triples (stores) can 
be serialized by simply throwing them in to a serialization function.

I'd then thought we (or another WG, or implementations) would define 
another store which extended DataStore adding additional functionality 
like that found in tabulators IndexedFormula (that 3rd API).

In addition to the above, I see 2 more areas where our approach differs:

First, I'd always thought of DataQuery / SPARQL functionality as more of 
an interface which you passed a store in to, rather than functionality 
which extends Store.

Secondly, and this is in some ways more general to RDF yet, I'd always 
thought of the store you mention in terms of a single graph which you 
add more triples to (or indeed remove some from), rather than an 
interface which masked several different graphs - as in I'd always 
thought of RDF to be a single giant global graph, of which you only ever 
have a certain set of triples at any one time.

Perhaps we need to discuss these points before going any further,

Best, and again thanks for mentioning the above!

Nathan

Received on Tuesday, 12 October 2010 10:45:41 UTC