This project has retired. For details please refer to its Attic page.
Apache Marmotta - Apache Marmotta Platform: Backends

Apache Marmotta Platform: Backends

Introduction

Starting with version 3.2, Apache Marmotta supports exchangeable triple store backends. This allows users of existing triple stores to simply connect to these and offer the data as Linked Data and it allows the use of special purpose triple stores like BigData. Currently, the following backends are available for Marmotta:

  • KiWi Triple Store: this is still the default backend for Apache Marmotta, as it is the most flexible and with most features; the KiWi triple store stores all data in a relational database
  • Sesame Native: allows to use a Sesame NativeStore as backend for Apache Marmotta; the Sesame NativeStore is a lightweight triple store that stores all data in a directory in the file system
  • BigData (experimental): allows to use a BigData triple store as backend; BigData is a high-performance triple store implementation for huge datasets; note that BigData is published under GPL license and thus not compatible with the Apache Software License; the BigData backend is therefore not built by default and needs to be compiled manually from the Marmotta source code;

Note that not all triple stores support all Marmotta functionalities. At the moment, reasoning and versioning are only supported by the KiWi backend.

Configuration

Changing backends is currently only possible when assembling the web application .war file, because only one backend can be on the classpath for any installation. The easiest way to change the Marmotta backend is to copy over the configuration from the default webapp launcher in launchers/webapp and change the Maven build file (pom.xml) by adding dependencies to the appropriate backend.

KiWi Backend

For using the KiWi Backend, you should add the following dependencies to your pom.xml file:

    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-backend-kiwi</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-common</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-kiwi</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-reasoner-kiwi</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-sparql</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-security</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-versioning-common</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-versioning-kiwi</artifactId>
        <version>3.3.0</version>
    </dependency>

The administration interface will then also include an appropriate configuration screen for the KiWi backend (e.g. for configuring a different database backend than the default H2).

Sesame Native Backend

For using the Sesame Native backend, add the following dependencies to your pom.xml file (or replace the KiWi dependencies described above):

    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-backend-native</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-common</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-file</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-sparql</artifactId>
        <version>3.3.0</version>
    </dependency>

Note that the Sesame Native backend currently does not support versioning and reasoning, therefore these modules are not configured here. The administration interface will then again include an appropriate configuration screen for configuring the backend.

BigData Backend

The BigData library is unfortunately only available with GPL license, which is not fully compatible with the more liberal Apache License used by Apache Marmotta. For this reason, we do not distribute binary versions of the BigData backend. Instead, you need to manually check out the source code of Marmotta from the GIT repository and build the whole source tree with the following command:

    mvn clean install -Pnon-free

After this, for using the Sesame Native backend, add the following dependencies to your pom.xml file (or replace the KiWi dependencies described above):

    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-backend-bigdata</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-common</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-ldcache-file</artifactId>
        <version>3.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.marmotta</groupId>
        <artifactId>marmotta-sparql</artifactId>
        <version>3.3.0</version>
    </dependency>

Note that the BigData library still uses the Sesame 2.6 API while Marmotta uses Sesame 2.7. Also, BigData bypasses the normal SPARQL query evaluation of Sesame, so we cannot easily integrate our transaction functionalities. For this reason, the BigData integration is still experimental and we do not recommend it for production use yet.