Running a HeFQUIN Service via the embedded servlet container
HeFQUIN can be deployed as a web service using a Jetty servlet container embedded in each release. This page describes how you can do this
- by using one of the available releases or
- by using the current developer version in the source code repository.
In either case, after starting it up, you can interact with the service like a SPARQL endpoint.
Use an Available Release
The HeFQUIN releases include a command-line program to start the HeFQUIN service using the embedded servlet container. After downloading the release package and unpacking it, enter the resulting directory in a command-line terminal and, then, execute the following command (which assumes that you have a relatively recent version of Java installed).
bin/hefquin-server
(or bat\hefquin-server.bat
if you are using Windows.)
Now, the HeFQUIN service should be running, which you can test by opening http://localhost:8080/
in a Web browser, and you can interact with the service like a SPARQL endpoint (the SPARQL endpoint should be exposed at http://localhost:8080/sparql
).
To use the HeFQUIN service for your own federation, create a description of your federation and, then, refer the aforementioned command-line program to the file with this description (e.g., MyFedConf.ttl
) by providing a --federationDescription
argument as follows.
bin/hefquin-server --federationDescription=MyFedConf.ttl
Further arguments can be passed to the command-line program (e.g., to specify the port used by the HeFQUIN service). To see a list of supported arguments, use the argument --help
.
bin/hefquin-server --help
Use a Version of the Source Code
If you want to run a HeFQUIN service that is based on the current developer version of HeFQUIN (or any other snapshot of the HeFQUIN source code), you need a local clone of the GitHub repository of HeFQUIN.
If you have not cloned the repository already, you can clone it either by using the SSH URL:
git clone git@github.com:LiUSemWeb/HeFQUIN.git
or by using the HTTP URL:
git clone https://github.com/LiUSemWeb/HeFQUIN.git
If you have cloned the repository earlier, make sure that you pull the latest version of the source code into your local clone:
git checkout main
git pull
Within the directory into which you have cloned the repo, you can now compile the source code using Maven by executing the following command.
mvn clean package
Assuming the build finishes successfully, you can now start the service using the hefquin-server
as described above.
Alternatively, you can use the Java interpreter directly to start the Java program that runs the service. To this end, execute the following command, where x.y.z-SNAPSHOT
needs to be replaced by the current version that was built. Notice also that you may add any of the arguments that can be passed to the program, including --federationDescription
(see above); use the argument --help
to have all possible arguments listed.
java -cp hefquin-cli/target/hefquin-cli-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunHeFQUINServer