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.
- Go 1.26.1 or newer, matching
go.mod. - Oxigraph CLI, available as
oxigraphonPATH. aggregator-conformance, either as a sibling checkout at../aggregator-conformanceor as an executable onPATH.
Install Oxigraph with Cargo:
cargo install oxigraph-cliOxigraph'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"' >> ~/.bashrcVerify the installation:
oxigraph --versionThe 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.
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.goThe 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 -hFor example, to run with a custom config path and debug logging:
go run cmd/aggregator/main.go -config /path/to/aggregator.config.json -l debugThe 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_fragmentbecomes the function IRI fragment, for example/transformations#QueryView.transformation_label,transformation_description, andtransformation_commentbecome the human-readable FnO metadata.transformation_source_fragmentbecomes the required source parameter IRI, for example/transformations#SourceParameter.transformation_source_labellabels that source parameter.transformation_output_fragmentbecomes the output IRI, for example/transformations#Result.transformation_output_labellabels that output.
The catalog also publishes two generated fno:predicate IRIs:
<base_url>/transformations#sourcefor the source parameter.<base_url>/transformations#resultfor 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.
Run the Go test suite and emit the JSON stream used by the conformance converter:
make testRun the full conformance workflow when aggregator-conformance is available on PATH:
make conformance-checkBy 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