The following output is generated after an experiment with this hook has run.
output/stats-sparql-endpoint-comunica.csv: Per second of the experiment: CPU percentage, memory usage (bytes), memory percentage, received bytes, transmitted bytes.
By default, the hook handler sparql-endpoint-comunica expects the dataset to be served through http.
If you want to use a local file as source for the comunica endpoint you can bind a local dataset to comunica docker container.
To do so, follow these steps:
First, use lerna-docker to create a docker image of engines/query-sparql-file. For this use the dockerfile in engines/query-sparql.
Then generate an experiment and add the sparql-endpoint-comunica hook like explained above.
In the generated experiment, you should change the client dockerfile:
The first part before the : denotes where our dataset is found locally, while the second part shows where the dataset will be available in the Docker image.
JBR Hook - SPARQL Endpoint Comunica
A jbr hook type for a Comunica-based SPARQL endpoint.
Requirements
Configure an experiment hook
If an experiment requires a hook for a SPARQL endpoint, then you can install this Comunica-based SPARQL endpoint as follows.
Output
The following output is generated after an experiment with this hook has run.
output/stats-sparql-endpoint-comunica.csv
: Per second of the experiment: CPU percentage, memory usage (bytes), memory percentage, received bytes, transmitted bytes.output/logs/sparql-endpoint-comunica.txt
: Logs of the Comunica SPARQL endpoint.Configuration
When installing this hook, your configuration file (
jbr-experiment.json
) will contain the following:Any config changes require re-running the prepare step.
More background information on these config options can be found on https://comunica.dev/.
Configuration fields
dockerfileClient
: Path to the Dockerfile of Comunica.resourceConstraints
: Resource constraints for the Docker container.configClient
: Path to the configuration file of a Comunica engine.clientPort
: HTTP port on which the SPARQL endpoint will be exposed.clientLogLevel
: Logging level for Comunica engine.queryTimeout
: Timeout in seconds for a single SPARQL query execution.maxMemory
: Maximum amount of Memory for the Comunica Node.js process in MB.additionalBinds
: The Local file bindings to the client dockerfile.Querying local files
By default, the hook handler sparql-endpoint-comunica expects the dataset to be served through http. If you want to use a local file as source for the comunica endpoint you can bind a local dataset to comunica docker container. To do so, follow these steps:
First, use lerna-docker to create a docker image of engines/query-sparql-file. For this use the dockerfile in engines/query-sparql. Then generate an experiment and add the sparql-endpoint-comunica hook like explained above. In the generated experiment, you should change the client dockerfile:
Change the default docker image to your newly created docker image. For example:
Furthermore, change the config-client.json and context-client.json
In the config-client.json change the import of
to
Then in the context-client.json set sources to
This path should point to where you want your dataset to be available in the Docker image.
Finally, we want to bind our dataset to the sources path we've specified above. This is done in the jbr-experiment.json
By default the entry for the hookSparqlEndpoint should look like this
In this, we set
The first part before the
:
denotes where our dataset is found locally, while the second part shows where the dataset will be available in the Docker image.License
jbr.js is written by Ruben Taelman.
This code is copyrighted by Ghent University – imec and released under the MIT license.