Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First documentation in README.md #355

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 128 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,134 @@ HeFQUIN is a query federation engine for heterogeneous federations of graph data
### Current Limitations
* HeFQUIN does not yet have a source selection component. All subpatterns of the queries given to HeFQUIN need to be wrapped in SERVICE clauses.

### Publications related to HeFQUIN
## Quick Start

HeFQUIN can be used as a Web service or via a Command Line Interface (CLI) tool.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third option: as a Java library linked directly into Java applications (perhaps also for other JVM-based languages such as Scala?)


### Running as a Web service
The Web service can be run using Docker, via an embedded server, or in a separate servlet container such as Tomcat or Jetty.

<details>
<summary><b>Run using Docker</b></summary>

Download or clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build and run the latest version of the engine using:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "Download" mean? Downloading the ZIP / TAR.GZ file of one of the releases?

Assuming yes, then this should be the default option that we advertise here in the quick start guide. The option to clone the repo may be mentioned briefly, with a reference to the corresponding part of the detailed documentation pages.

```bash
$ docker-compose build
$ docker-compose up
```

The optional build argument (`TAG`) can used to build the image from a specific release:
```yml
hefquin:
build:
context: .
args:
TAG: <insert tag>
ports:
- "8080:8080"
```

The engine can be configured by mounting custom configuration files when starting up the container:
```yml
hefquin:
build: .
ports:
- "8080:8080"
volumes:
- ./example/config.properties:/usr/local/tomcat/webapps/ROOT/config.properties
- ./example/ExampleEngineConf.ttl:/usr/local/tomcat/webapps/ROOT/ExampleEngineConf.ttl
- ./example/ExampleFedConf.ttl:/usr/local/tomcat/webapps/ROOT/ExampleFedConf.ttl
```

where the `config.properties` file has the following structure:
```bash
ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
Comment on lines +38 to +65
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things should also be moved to the detailed documentation pages, and here we mention only briefly that these things are possible and refer to the documentation pages for the details.


By default the service exposes a SPARQL endpoint at `http://localhost:8080/sparql`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant only for the Docker option? If not, we should move up to the general part about the Web service (i.e., right before the collapsible subsections).

</details>

<details>
<summary><b>Run the server embedded in the JAR file</b></summary>

__Option 1:__ Clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build the latest version of the engine using:
```bash
$ mvn clean package
```
To use a specific release, checkout the tag before building:
```bash
$ git checkout <insert tag>
$ mvn clean package
```

__Option 2:__ Download a JAR file from the set of available releases (see [Releases](https://github.com/LiUSemWeb/HeFQUIN/releases)).
Comment on lines +73 to +83
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not advertise option 1 here but move it to the detailed documentation, and here only briefly mention the existence of this option, with a reference to the corresponding part of the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An issue about the text for option 2 is that there are no JAR files at https://github.com/LiUSemWeb/HeFQUIN/releases -- Is this something that we need to enable somehow? Or can the creation of releases on the Github Website only produce ZIP and TAR.GZ files?


Start the server in a terminal by running the following command:
```bash
java -cp target/HeFQUIN-x.y.z-SNAPSHOT.jar se.liu.ida.hefquin.service.HeFQUINServer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works only for option 1 above, not for option 2 (assuming option 2 is indeed about downloading a JAR file).

```

The engine can be configured by modifying the `config.properties` file in the working directory. The `config.properties` file has the following structure:
```bash
ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
Comment on lines +90 to +94
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps that's also something to be moved to the detailed documentation pages.

</details>

<details>
<summary><b>Run in a separate servlet container</b></summary>

__Option 1:__ Clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build the latest version of the engine using:
```bash
$ mvn clean package
```
To use a specific release, checkout the tag before building:
```bash
$ git checkout <insert tag>
$ mvn clean package
```

__Option 2:__ Download a JAR file from the set of available releases (see [Releases](https://github.com/LiUSemWeb/HeFQUIN/releases)).
Comment on lines +100 to +110
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some two comments as above (i.e., option 1 should be moved to the detailed documentation and there is no JAR at the moment).


Deploy `target/HeFQUIN-x.y.z-SNAPSHOT.war` in your serlet container.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't work for option 2 (download a JAR file).


The engine can be configured by modifying the `config.properties` file in the working directory. The `config.properties` file has the following structure:
```bash
ENGINE_CONF_FILE=ExampleEngineConf.ttl # the engine configuration file
FED_CONF_FILE=ExampleFedConf.ttl # the federation configuration file
```
Comment on lines +114 to +118
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like above, perhaps that's something to be moved to the detailed documentation pages a well.

> __NOTE__: The servlet will need to be restarted for any changes in the engine configuration to take effect.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant only for the 'separate servlet container' case?

</details>

### Run using the CLI tool

__Option 1:__ Clone the project from the HeFQUIN repository and navigate to the project root in a terminal. Build the latest version of the engine using:
```bash
$ mvn clean package
```
To use a specific release, checkout the tag before building:
```bash
$ git checkout <insert tag>
$ mvn clean package
```
Comment on lines +124 to +132
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, this option should be moved to the detailed documentation, and then only briefly referred to from here.


__Option 2:__ Download a JAR file from the set of available releases (see [Releases](https://github.com/LiUSemWeb/HeFQUIN/releases)).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No JAR under Releases.


Example usage:
```bash
java -cp target/HeFQUIN-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work if a JAR has been downloaded.

--query ExampleQuery.rq \
--federationDescription ExampleFederation.ttl \
--confDescr ExampleEngineConf.ttl
```

For a full list of the parameters with which the CLI tool can be run, use the following command:
```bash
java -cp target/HeFQUIN-x.y.z-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel --help
```

## Publications related to HeFQUIN
* Sijin Cheng and Olaf Hartig: **[FedQPL: A Language for Logical Query Plans over Heterogeneous Federations of RDF Data Sources](https://olafhartig.de/files/ChengHartig_FedQPL_iiWAS2020_Extended.pdf)**. In _Proceedings of the 22nd International Conference on Information Integration and Web-based Applications & Services (iiWAS)_, 2020.
* Sijin Cheng and Olaf Hartig: **[Source Selection for SPARQL Endpoints: Fit for Heterogeneous Federations of RDF Data Sources?](https://olafhartig.de/files/ChengHartig_QuWeDa2022.pdf)**. In _Proceedings of the 6th Workshop on Storing, Querying and Benchmarking Knowledge Graphs (QuWeDa)_, 2022.
* Sijin Cheng and Olaf Hartig: **[A Cost Model to Optimize Queries over Heterogeneous Federations of RDF Data Sources](https://olafhartig.de/files/ChengHartig_CostModel_DMKG2023.pdf)**. In _Proceedings of the 1st International Workshop on Data Management for Knowledge Graphs (DMKG)_, 2023.
Expand Down
Loading