|
1 | | -# Tᴇɴᴛʀɪs: A Tensor-based Triple Store |
| 1 | +# Tentris: A Tensor-based Triple Store |
2 | 2 |
|
3 | | -<p><img src = "https://tentris.dice-research.org/iswc2020/assets/img/Tentris_logo.svg" alt = "Tᴇɴᴛʀɪs Logo" width = "30%" align = "center"></p> |
| 3 | +Tentris is a tensor-based triplestore that natively supports worst-case optimal joins. |
4 | 4 |
|
5 | | -Tᴇɴᴛʀɪs is a tensor-based RDF triple store with SPARQL support. It is introduced and described in: |
6 | | -> [Alexander Bigerl, Felix Conrads, Charlotte Behning, Mohamed Ahmed Sherif, Muhammad Saleem and Axel-Cyrille Ngonga Ngomo (2020) |
7 | | -**Tentris – A Tensor-Based Triple Store. |
8 | | -** In: The Semantic Web – ISWC 2020](https://tentris.dice-research.org/iswc2020/) |
| 5 | +This is the research version of Tentris. A commercial version is available at https://github.com/tentris/tentris. |
9 | 6 |
|
10 | | -and |
| 7 | +## Features |
11 | 8 |
|
12 | | -> [Alexander Bigerl, Lixi Conrads, Charlotte Behning, Muhammad Saleem and Axel-Cyrille Ngonga Ngomo (2022) Hashing the Hypertrie: Space- and Time-Efficient Indexing for SPARQL in Tensors. In: The Semantic Web – ISWC 2022 Hashing the Hypertrie: Space- and Time-Efficient Indexing for SPARQL in Tensors](https://tentris.dice-research.org/iswc2022/) |
| 9 | +- SPARQL endpoint supporting `SELECT`, `SELECT DISTINCT` and `ASK` queries at `/sparql` and `/stream`. The `WHERE` block |
| 10 | + may contain basic graph patterns and OPTIONAL clauses. |
| 11 | + Queries must be well-designed [Kaminski et al. (2018)](https://doi.org/10.1007/s00224-017-9802-9) |
| 12 | +- Supports `INSERT DATA`/`DELETE DATA` updates that are synchronized with a reader-writer lock at `/update`. |
| 13 | +- Supports streaming results through the `/stream` endpoint for large results. |
| 14 | +- Tentris is a persistent triplestore that uses [metall](https://github.com/LLNL/metall) to manage its disk-based index. |
| 15 | + Note that previous versions were in-memory. |
13 | 16 |
|
14 | | -## Get It |
| 17 | +## Download |
15 | 18 |
|
16 | | -* download [static prebuilt binaries](https://github.com/dice-group/tentris/releases) |
17 | | - and [try them out](#running-tentris) |
18 | | -* [build it with docker](#docker) |
| 19 | +We provide pre-built binaries in the [releases](https://github.com/dice-group/tentris-research-project/releases) that run on Linux machines with fairly recent (after 2015) x86_64 CPUs. |
19 | 20 |
|
20 | | -## Running Tᴇɴᴛʀɪs |
| 21 | +## Running |
21 | 22 |
|
22 | | -<details><summary> </summary> |
| 23 | +Initialize Tentris' index with an empty graph with: |
23 | 24 |
|
24 | | -#### Bulk-load Data |
| 25 | +```shell |
| 26 | +./tentris_loader -f <(echo "") |
| 27 | +``` |
25 | 28 |
|
26 | | -Provide an NTRIPLE or TURTLE file to build the an index. By default, the index is stored in the current directory. The |
27 | | -path can be changed with the option `--storage`. |
| 29 | +Or initialize it by loading a turtle or ttl file: |
28 | 30 |
|
29 | 31 | ```shell |
30 | 32 | tentris_loader --file my_nt_file.nt |
31 | 33 | ``` |
32 | 34 |
|
33 | | -#### Start HTTP endpoint |
34 | | - |
35 | | -To start Tᴇɴᴛʀɪs as a HTTP endpoint on port 9080 run now: |
| 35 | +Start the Tentris endpoint at [127.0.0.1:9080/sparql](http://127.0.0.1:9080/sparql): |
36 | 36 |
|
37 | 37 | ``` |
38 | 38 | tentris_server -p 9080 |
39 | 39 | ``` |
40 | 40 |
|
41 | | -#### Query |
42 | | - |
43 | | -The SPARQL endpoint may now be queried locally at: `127.0.0.1:9080/sparql?query=*your query*`. You can execute queries |
44 | | -with the following curl command: |
| 41 | +Run a query with : |
45 | 42 |
|
46 | 43 | ```shell |
47 | 44 | curl -G \ |
48 | 45 | --data-urlencode 'query=SELECT * WHERE { ?s ?p ?o . }' \ |
49 | 46 | '127.0.0.1:9080/sparql' |
50 | 47 | ``` |
51 | 48 |
|
52 | | -If you want to type the query in your browser, the query string must be URL encoded. You can use any online URL encoder |
53 | | -like <https://meyerweb.com/eric/tools/dencoder>. |
54 | | - |
55 | | -The following endpoints are available: |
56 | | -Available endpoints: |
| 49 | +Or update your data with: |
57 | 50 |
|
58 | | -- HTTP GET `/sparql?query=` for normal queries |
59 | | -- HTTP GET `/stream?query=` for queries with huge results |
60 | | -- HTTP GET `/count?query=` as a workaround for count (consumes a select query) |
61 | | - |
62 | | -</details> |
| 51 | +```shell |
63 | 52 |
|
64 | | -## Docker |
| 53 | +curl -X POST \ |
| 54 | +-H 'Content-Type: application/sparql-update' \ |
| 55 | +--data 'INSERT DATA { <http://example.org/subject> <http://example.org/predicate> "object" . }' \ |
| 56 | +'127.0.0.1:9080/sparql' |
| 57 | +``` |
65 | 58 |
|
66 | | -<details><summary> </summary> |
| 59 | +The following endpoints are available: |
67 | 60 |
|
68 | | -Use the [Dockerfile](./Dockerfile) to build tentris. |
| 61 | +- HTTP GET `/sparql` for normal SPARQL queries |
| 62 | +- HTTP GET `/stream` for SPARQL queries with huge results |
| 63 | +- HTTP POST `/update` for `INSERT DATA` and `DELETE DATA` updates |
69 | 64 |
|
70 | | -* A docker image is available on [docker hub](https://hub.docker.com/r/dicegroup/tentris_server). Get it with |
71 | | - ```shell script |
72 | | - docker build -f Dockerfile . |
73 | | - docker pull dicegroup/tentris_server |
74 | | - ``` |
| 65 | +## Build It |
75 | 66 |
|
76 | | -</details> |
| 67 | +Tentris is known to build on Ubuntu 22.04 and newer. |
| 68 | +Building was tested with Clang 17 & 19. As C++ standard template library, only `libstdc++11` (v13) was tested. For |
| 69 | +details |
| 70 | +refer to the [Dockerfile](./Dockerfile) or GitHub actions. |
77 | 71 |
|
78 | | -## Build It Yourself |
| 72 | +# Research |
79 | 73 |
|
80 | | -<details><summary> </summary> |
| 74 | +- Alexander Bigerl, Liss Heidrich, Nikolaos Karalis and Axel-Cyrille Ngonga Ngomo (2025) **Efficient Updates for |
| 75 | + Worst-Case Optimal Join Triple Stores.** In: The Semantic Web – ISWC |
| 76 | + 2025 | [website](https://github.com/dice-group/tentris-wcoj-with-updates/) |
81 | 77 |
|
82 | | -Tᴇɴᴛʀɪs is known to build on Ubuntu 22.04 and newer. |
83 | | -Building was tested with Clang 17 & 19. As standard library, only libstdc++11 (v13) was tested. For details |
84 | | -refer to the [Dockerfile](./Dockerfile) or github actions. |
| 78 | +- Alexander Bigerl, Lixi Conrads, Charlotte Behning, Muhammad Saleem and Axel-Cyrille Ngonga Ngomo (2022) **Hashing the |
| 79 | + Hypertrie: Space- and Time-Efficient Indexing for SPARQL in Tensors.** In: The Semantic Web – ISWC |
| 80 | + 2022 | [website](https://tentris.dice-research.org/iswc2022/) |
85 | 81 |
|
86 | | -</details> |
| 82 | +- Alexander Bigerl, Felix Conrads, Charlotte Behning, Mohamed Ahmed Sherif, Muhammad Saleem and Axel-Cyrille Ngonga |
| 83 | + Ngomo (2020) |
| 84 | + **Tentris – A Tensor-Based Triple Store.** |
| 85 | + In: The Semantic Web – ISWC 2020 | [website](https://tentris.dice-research.org/iswc2020/) |
0 commit comments