TREEcg / specification

RDF vocabulary and hypermedia specification to publish your Linked Data using search trees
https://w3id.org/tree/specification
27 stars 12 forks source link

Design Issue: live data #21

Open pietercolpaert opened 4 years ago

pietercolpaert commented 4 years ago

How can we split live data from planned/static data?

Proposal 1: simple import

This doesn’t require the client to understand it’s live data, it just always will need to follow the embed as there is no tree:path associated with it. TREE should elaborate to always take into account the last version of an entity it found.

<currentpage?departureTime=2020-04-09> a tree:Node ;
        tree:import <live.ttl> ; 
        tree:importStream <ws://example.org/live/delays> .

Proposal 2: referring to a new entity with an update

E.g., by using the path to a dcterms:isReplacedBy entity, which repeats all triples that didn’t change as well.

<currentpage?departureTime=2020-04-09> a tree:Node ;
    tree:conditionalImport [
                tree:path dcterms:isReplacedBy ;
        tree:import <live.ttl> ; 
        tree:importStream <ws://example.org/live/delays>
       ] .

Problem with this approach is that a client needs to look specifically also for entities that replace an entity of interest. The benefit is that a client can also specifically not download updates if it doesn’t want to.

Instead of using dcterms:isReplacedBy, we can also introduce a TREE specific term such as tree:hasUpdate, which is a new entity that can overwrite the existing entity in the same way as dcterms:isReplacedBy would do, without having to repeat all triples that didn’t change.

The only problem I can still think of then is the fact that rdf container additions and removals would have to remention the entire container. For deletions always using lazy deletions might be a solution (can be ontology specific).

pietercolpaert commented 4 years ago

Handled partly in this pull request: https://github.com/TREEcg/specification/pull/24

pietercolpaert commented 3 years ago

Renamed to tree:conditionalImport

pietercolpaert commented 3 years ago

Related: #27