rdf-connect / ldes-client

The TREE/LDES client to replicate and synchronize LDESs: the RDF Connect processor
https://rdf-connect.github.io/ldes-client/
6 stars 2 forks source link

Smarter state with timestampPath #19

Open pietercolpaert opened 3 months ago

pietercolpaert commented 3 months ago

The state can be kept more efficiently, even without immutable caching headers, when the timestampPath is set:

The state then may become:

All relations that point at earlier data can be forgotten.

pietercolpaert commented 3 months ago

A more concise rewrite of the above:

Given that:

  1. an ldes:timestampPath is set,
  2. a relation uses that timestampPath in the relation, and
  3. we’re processing chronologically (ascending)

    Then, when the relation points at something that is earlier than the current time we’re processing, a client can ignore the relation and not include it in the state.

The state however needs to be extended with:

  1. The fact timestampPath can be taken into account and the last processed timestamp
  2. The IRIs of all members on that timestamp that were already processed (otherwise, a member on exactly that timestamp might be emitted a second time when resuming)