Skip to content

SolidLabResearch/provision-aggregator

Repository files navigation

Provision Aggregator

Go implementation of a query materializing Aggregator Server using a provision management flow, developed conformance-first against the aggregator conformance suite. The "provision" in Provision Aggregator refers to the management flow where the server provisions the aggregator identity instead of the users giving theirs to the server.

Dependencies

  • Go 1.26.1 or newer, matching go.mod.
  • Oxigraph CLI, available as oxigraph on PATH.
  • aggregator-conformance, either as a sibling checkout at ../aggregator-conformance or as an executable on PATH.

Install Oxigraph with Cargo:

cargo install oxigraph-cli

Oxigraph's Cargo build requires a recent Rust/Cargo toolchain and may require Clang for the RocksDB bindings. Cargo installs binaries in ~/.cargo/bin by default. Add that directory to your shell PATH if oxigraph is not found:

export PATH="$HOME/.cargo/bin:$PATH"

For a permanent Bash setup:

echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc

Verify the installation:

oxigraph --version

The materializer uses oxigraph load to load RDF source documents and oxigraph query to write materialized CONSTRUCT or SELECT outputs. Official CLI installation docs are at https://docs.rs/oxigraph-cli.

Running the Server

Add a aggregator.config.json file to the current directory. An example of such a directory with the contents can be found in aggregator.config.example.json.

Then run the server:

go run cmd/aggregator/main.go

Command-line and configuration

The server accepts these command-line options:

go run cmd/aggregator/main.go -config aggregator.config.json -loggingLevel info

-config selects the JSON config file. The default is aggregator.config.json in the current directory.

-loggingLevel controls log verbosity and accepts debug, info, warn, or error. The short form -l is equivalent. The default is info.

Use -h to print the available command-line options:

go run cmd/aggregator/main.go -h

For example, to run with a custom config path and debug logging:

go run cmd/aggregator/main.go -config /path/to/aggregator.config.json -l debug

The local listen port comes from the config file's port value. The advertised public URL comes from base_url; this may include a path prefix when the server runs behind a reverse proxy.

The transformation fields in the config describe the function advertised at the transformation catalog endpoint:

  • transformation_fragment becomes the function IRI fragment, for example /transformations#QueryView.
  • transformation_label, transformation_description, and transformation_comment become the human-readable FnO metadata.
  • transformation_source_fragment becomes the required source parameter IRI, for example /transformations#SourceParameter.
  • transformation_source_label labels that source parameter.
  • transformation_output_fragment becomes the output IRI, for example /transformations#Result.
  • transformation_output_label labels that output.

The catalog also publishes two generated fno:predicate IRIs:

  • <base_url>/transformations#source for the source parameter.
  • <base_url>/transformations#result for the output.

Service creation requests bind input data to the configured source parameter IRI with fnoc:boundParameter and provide source URLs with fnoc:boundToTerm. The materializer loads those source documents into Oxigraph and runs the service request's SPARQL query once to produce the output.

Testing

Run the Go test suite and emit the JSON stream used by the conformance converter:

make test

Run the full conformance workflow when aggregator-conformance is available on PATH:

make conformance-check

By default the Makefile uses a sibling checkout at ../aggregator-conformance. Override it if the CLI is installed elsewhere:

make conformance-check CONFORMANCE_CLI=aggregator-conformance

About

Go implementation of a provision query materializing Aggregator Server, developed conformance-first against the aggregator conformance suite.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors