On 23/06/2023 14:06, Arne Bernhardt wrote:
The switch to term-equality might break some code that uses the current
default implementation.
A switch in the GraphMemFactory in Jena 5.x to make it backwards compatible
seems to be a good option.

We don't get many points when we can make such changes.
Setting the default is major version territory.

In this case, the general Jena codebase should remain compatible with the
literal value equality semantics.

It is hard for Fuseki users to notice. The transactional in-memory dataset is already term-semantics.

It's easier for API users to configure details as necessary or to smooth their migration.

As far as I know, org.apache.jena.graph.Capabilities#handlesLiteralTyping
should be used to control the behaviour here.

Capabilities can be unreliable - applications don't seem to check! TDB1, TDB2 canonicalization some known datatypes on input which isn't the exact definition of term or value semantics. There will be one triple for ":s :p 1" and ":s :p +1 which is term like.

I think this is a simpler-is-better case. Applications makes the choice by the ModelFactory call and have a single API setting for the default.

What we do know is that all other storage graphs are term-semantics and the issue doesn't come up very often. And when it does, it has been a matter of explaining the situation.

(FYI: There is one impl GraphPlain that undoes value-semantics.)

My guess is, we might find
some places where it is not considered yet, because GraphMem has been the
default for so many years.

Yes - in tests for example.

Where there are tests, move them to a test class which is specific to GraphMem (if not already).

Then one test for "current settings".

If there is not enough time to evaluate GraphMem2Fast over the summer, it
may be wise to start with GraphMem2Legacy as the default in Jena 5.x.
If the community sees a real advantage in GraphMem2Fast, we could make it
the new default in a later version.

As long as the Jena 5.x contract is term-semantics, we can adjust best implementation in minor versions.

    Andy


    Arne

Am Fr., 23. Juni 2023 um 13:08 Uhr schrieb Andy Seaborne <a...@apache.org>:



On 22/06/2023 21:08, Arne Bernhardt wrote:
Do you think it would be possible to integrate
https://github.com/apache/jena/issues/1912 in Jena  4.9.0 ?
So there would be enough time and feedback to see if it can replace
GraphMem as default in Jena 5.0.0?

   Arne

Yes.

A switch to term-semantics by default in graph/model is a 5.x thing but
the code can be available. Feedback would be good but we can't rely on
that; everyone is time-short.

So would this be extra calls in ModelFactory?
Possibly with a single switch so that the default can be made into one
of the new term graphs? These Models and Graphs get created implicit as
well as by application calls to ModelFactory.

      Andy

Let's rename org.apache.jena.graph.Factory to
org.apache.jena.graph.GraphMemFactory at 5.0.0
It's annoying.

https://github.com/apache/jena/issues/1919
and PR 1920 to start the process.


Reply via email to