Skip to content

Commit

Permalink
GH-3416 basic documentation for LDMB Store
Browse files Browse the repository at this point in the history
  • Loading branch information
abrokenjester committed Jan 22, 2022
1 parent 3d093df commit 123ae4e
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 8 deletions.
5 changes: 1 addition & 4 deletions bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.rdf4j</groupId>
Expand Down Expand Up @@ -410,7 +408,6 @@
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- LMDB native extensions -->
<dependency>
<groupId>org.lwjgl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
/**
* A SAIL implementation using LMDB for storing and querying its data.
*
* @implNote the LMDB store is is in an experimental state: its existence, signature or behavior may change without
* warning from one release to the next.
*/
@Experimental
public class LmdbStore extends AbstractNotifyingSail implements FederatedServiceResolverClient {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/**
* The LMDB based Store.
*
* @implNote the LMDB store is in an experimental state: its existence, signature or behavior may change without warning
* from one release to the next.
*/
package org.eclipse.rdf4j.sail.lmdb;
package org.eclipse.rdf4j.sail.lmdb;
4 changes: 1 addition & 3 deletions core/storage/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.rdf4j</groupId>
Expand Down
68 changes: 68 additions & 0 deletions site/content/documentation/programming/lmdb-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: "The LMDB Store"
toc: true
weight: 4
autonumbering: true
---


{{< tag "New in RDF4J 4.0" >}}
{{< tag "Experimental" >}}

The RDF4J LMDB Store is a new SAIL database, using the [Symas Lightning
Memory-Mapped Database](https://www.symas.com/lmdb): a fast embeddable
key-value database using memory-mapped IO for great performance and stability.
<!--more-->


The LMDB Store can be used in any RDF4J project that requires persistent
storage that is fast, scalable and reliable.

## Dependencies for the LMDB Store and native extensions

To make use of the LMDB Store, you'll need to include the following Maven dependency:

```xml
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-sail-lmdb</artifactId>
</dependency>
```

Alternatively you can also rely on the `rdf4j-storage` pom dependency (see (["Which maven artifact?"](/documentation/programming/setup/#which-maven-artifact)), which includes the LMDB Store.

Because the LMDB Store relies on a third party embedded database (LMDB) that is
not itself a Java library, you'll need two additional runtime dependencies for
native extensions, provided by [LWJGL](https://lwjgl.org/). These dependencies
have an OS-specific classifier that is based on the platform OS you wish to run
on. For example, to run the LMDB Store on a Linux machine, you'll need to
include the following:

```xml
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-linux</classifier>
<scope>runtime</scope>
</dependency>
```

The required versions of the native extensions are in the [RDF4J Bill Of
Materials](/documentation/programming/setup/#the-bom-bill-of-materials).

Available extensions for different OS platforms:

| Operating System | native extension classifier |
|------------------|-----------------------------|
| Linux | `natives-linux` |
| MS Windows | `natives-windows` |
| Mac OS | `natives-macos` |
| Mac OS (ARM64) | `natives-macos-arm64` |


0 comments on commit 123ae4e

Please sign in to comment.