Skip to content

Replace Enola "hack" with "proper" (full) RDF Dataset Canonicalization #1103

Open

Description

@vorburger

Replying to @filip26 on filip26/ld-cli#71 today reminded me of (my) RdfCanonicalizer, and how that was a "quick hack", but not yet a "real" (full) implementation of https://github.com/w3c/rdf-canon/.

One can still already use it as-is via Enola's CLI as https://docs.enola.dev/use/canonicalize/ though. I originally wrote it, and currently actively use it, in the ModelSubject utility (which is a sort of "Matcher" for unit testing, for Truth).

But perhaps one day, especially if in the future it might also be used for (H)MAC hashing for "security" related ideas, or in the context of some things I'm dreaming about (but unfortunately don't really have much time for exploring, at my current day job workload...) e.g. in the #777 (IPFS IPLD & Co.) context, it would make sense to replace that original initial first quick stab with a "real" (full) implementation of https://github.com/w3c/rdf-canon/, one day.

Looking at https://w3c.github.io/rdf-canon/reports/, the candidate (Java) libraries seem to be:

  1. https://project.inria.fr/corese/ - probably much too huge?
  2. https://github.com/setl/rdf-urdna - looks better and somewhat more self contained already
  3. https://github.com/filip26/titanium-rdfc - not listed on rdf-canon/reports (yet?), but maybe the way to go?
  4. Isn't there something alreaddy directly using the RDF4j API? I've created rdf-canon (RDF Dataset Canonicalization) support eclipse-rdf4j/rdf4j#5255 about it.

Activity

  1. added
    enhancementNew feature or request
    help wantedExtra attention is needed
    javaPull requests that update Java code
    on Feb 22, 2025
  2. vorburger commented on Feb 24, 2025

    @vorburger
    MemberAuthor

    Looking at https://w3c.github.io/rdf-canon/reports/, the candidate (Java) libraries seem to be:

    Next step could be to explore, one day (not a high priority for me right now), just locally downstream in Enola, before further engaging upstream, if RdfCanonicalizer really needs the full https://github.com/filip26/titanium-json-ld/, or could be reduced to only require com.apicatalog.rdf.api.RdfQuadConsumer (as-is?), and then engage on apache/jena#2216 to see if proposing a separately released com.apicatalog:rdf-api sort of artefact would make any sense.

  3. filip26 commented on Feb 24, 2025

    @filip26

    if RdfCanonicalizer really needs the full https://github.com/filip26/titanium-json-ld/, or could be reduced to only require com.apicatalog.rdf.api.RdfQuadConsumer (as-is?)

    The next version, 2.0, which I hope will be released in a week or two, should depend only on RDF artifacts that are now part of Titanium (they will be removed from the next Titanium release). It is primarily used to obtain an N-Quads serialized representation, which is part of the canonicalization process. The long-term goal is to have it as self-contained as possible with minimal dependencies. However, further separation of artifacts beyond RdfQuadConsumer is more complex. The separation process will be incremental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededjavaPull requests that update Java code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions