On 11/07/17 18:08, Daan Reid wrote:

Our use case is to use the Delta to calculate the differences between graphs for events so we can replay additions and deletions without storing all the unchanged triples for each graph change event.

You may be interested in

https://afs.github.io/rdf-delta/

which can provide a way to record changes to a dataset.

It is a very different style off approach to the Delta graph. It creates a log of changes (adds and deletes, and also prefix changes) and ties into the transaction mechanism.

        Andy

Since we've got control over the database and the message converter we have since made a workaround by canonicalising the DB with some queries, and from now will use the RDFParser's forced canonical system (thanks for pointing that out!) on incoming messages to prevent this issue from affecting us in future.

A Delta wrapper that works by value instead of lexical equality sounds like it could be a great general solution, because the current situation's inconsistency is a bit of a gotcha.

For reference to those interested, the inconsistency is located in the fact that `GraphTripleStoreBase.contains()` checks by values, but `GraphTripleStoreBase.delete()` defers to `NodeToTriplesMapMem.remove()` which compares lexically. So in the `Delta.addTriple()`, the base graph does contain the (semantically equal) triple and hence it is not added to the additions, but the `deletions.delete()` checks by lexical value and hence does not delete it.

Regards, and thanks for the help,

Daan Reid
Drugis project -- https://drugis.org

Reply via email to