6 · Deployment — GraphDB, SPARQL endpoint, FAIR publishing

From local Protégé file to production: triplestore, named graphs, auth, CI/CD, PURL, content negotiation, Widoco docs.

0/2 done

Theory — Deployment

From medacore.ttl to a production endpoint

Triplestore — GraphDB Free

We picked GraphDB Free (Ontotext). Reasons:

  • Built-in OWL 2 RL/QL and OWL 2 RL+SH reasoning configs.
  • Native SHACL endpoint (/rest/shacl).
  • SPARQL 1.1 + Graph Store HTTP Protocol out of the box.
  • Decent admin UI for the PV team's ontology engineer.

Alternatives we considered: Apache Jena Fuseki (great, but reasoner config is finickier), Stardog (commercial, expensive at our scale), Blazegraph (unmaintained).

Repository layout

Two named graphs in the same repo:

  • <https://w3id.org/medacore/onto/0.3.0> — the ontology (read-mostly).
  • <https://w3id.org/medacore/data/current> — the instance data (frequently updated).

Why named graphs? So we can wipe and reload the data graph without ever risking the ontology graph.

CI/CD

A GitHub Actions workflow runs on every PR to medacore-onto/:

  1. pyshacl medacore.ttl shapes.ttl data-sample.ttl — SHACL conforms.
  2. robot reason --reasoner HermiT medacore.ttl --output classified.ttl — DL classification produces no unsatisfiable classes.
  3. robot diff --left previous.ttl --right medacore.ttl — diff posted to the PR for human review.
  4. On merge to main: tag a new vX.Y.Z, render docs with Widoco, push to S3 behind the PURL.

FAIR publishing

The PURL https://w3id.org/medacore/onto/0.3.0 is configured on w3id.org (community redirect service) to respond to content negotiation:

  • Accept: text/turtle → the .ttl file on S3.
  • Accept: application/rdf+xml → the RDF/XML rendering.
  • Accept: text/html → the Widoco-rendered docs.

That trio + a dcterms:license triple is what makes the ontology Findable, Accessible, Interoperable and Reusable — the FAIR principles in one sentence.

Reflect

FAIR is not a marketing term. Each letter cashes out in a specific deployment artefact you can point at.

  • Where in this deployment does the F (Findable) live? The A? The I? The R?
  • If your team can't host w3id.org, what's the next best PURL strategy?

Reading in progress · 0 of 2 activities done