Skip to content

Multi-User-Domain/LinkedDataHub

 
 

Repository files navigation

The Knowledge Graph management system

LinkedDataHub (LDH) is an open source software you can use to manage data, create visualizations and build apps on RDF Knowledge Graphs.

AtomGraph LinkedDataHub screenshot

Welcome to LinkedDataHub. We started the project with the intention to use it for Linked Data publishing, but gradually realized that we've built a multi-purpose data-driven platform.

We are building LinkedDataHub for:

  • domain experts who work with RDF data and need an accessible low-code publishing, exploration and management tool
  • developers who are looking for a declarative full stack framework for web application and API development
  • data engineers who need an open-source RDF platform that can be customized for a variety of use cases

What makes LinkedDataHub unique is its completely data-driven architecture: applications and documents are defined as data, managed using a single generic HTTP API and presented using declarative technologies. The default application structure and user interface are provided, but they can be completely overridden and customized. Unless a custom server-side processing is required, no imperative code such as Java or JavaScript needs to be involved at all.

Follow the Get started guide to build your first application on LinkedDataHub. The setup and basic configuration sections are provided below and should get you running.

Setup

Click to expand
  1. Install Docker
  2. Fork this repository and clone the fork into a folder
  3. In the folder, create an .env file and fill out the missing values (you can use .env_sample as a template). For example:
COMPOSE_CONVERT_WINDOWS_PATHS=1
COMPOSE_PROJECT_NAME=linkeddatahub

PROTOCOL=https
PROXY_HTTP_PORT=81
PROXY_HTTPS_PORT=4443
HOST=localhost
ABS_PATH=/

OWNER_MBOX=john@doe.com
OWNER_GIVEN_NAME=John
OWNER_FAMILY_NAME=Doe
OWNER_ORG_UNIT=My unit
OWNER_ORGANIZATION=My org
OWNER_LOCALITY=Copenhagen
OWNER_STATE_OR_PROVINCE=Denmark
OWNER_COUNTRY_NAME=DK
OWNER_KEY_PASSWORD=changeit
  1. Run this from command line:
docker-compose up
  1. LinkedDataHub will start and create the following sub-folders:
    • certs where your WebID certificates are stored
    • data where the triplestore(s) will persist RDF data
    • uploads where LDH stores content-hashed file uploads
  2. Install certs/owner.p12 into a web browser of your choice (password is the OWNER_KEY_PASSWORD value)
    • Google Chrome: Settings > Advanced > Manage Certificates > Import...
    • Mozilla Firefox: Options > Privacy > Security > View Certificates... > Import...
    • Apple Safari: The file is installed directly into the operating system. Open the file and import it using the Keychain Access tool.
    • Microsoft Edge: Does not support certificate management, you need to install the file into Windows. Read more here.
  3. Open https://localhost:4443/ in that web browser

After a successful startup, the last line of the Docker log should read:

  linkeddatahub_1    | 02-Feb-2020 02:02:20.200 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3420 ms

Notes

  • You will likely get a browser warning such as Your connection is not private in Chrome or Warning: Potential Security Risk Ahead in Firefox due to the self-signed server certificate. Ignore it: click Advanced and Proceed or Accept the risk to proceed.
    • If this option does not appear in Chrome (as observed on some MacOS), you can open chrome://flags/#allow-insecure-localhost, switch Allow invalid certificates for resources loaded from localhost to Enabled and restart Chrome
  • .env_sample and .env files might be invisible in MacOS Finder which hides filenames starting with a dot. You should be able to create it using Terminal however.
  • On Linux your user may need to be a member of the docker group. Add it using
sudo usermod -aG docker ${USER}

and re-login with your user. An alternative, but not recommended, is to run

sudo docker-compose up

Configuration

Click to expand

Base URI

Besides owner WebID configuration, the most common case is changing the base URI from the default https://localhost:4443/ to your own.

Lets use https://ec2-54-235-229-141.compute-1.amazonaws.com/linkeddatahub/ as an example. We need to split the URI into components and set them in the .env file using the following parameters:

PROTOCOL=https
HTTP_PORT=80
HTTPS_PORT=443
HOST=ec2-54-235-229-141.compute-1.amazonaws.com
ABS_PATH=/linkeddatahub/

ABS_PATH is required, even if it's just /.

Dataspaces

Dataspaces are configured in config/system.trig. Relative URIs will be resolved against the base URI configured in the .env file.

⚠️ Do not use blank nodes to identify applications or services. We recommend using the urn: URI scheme, since LinkedDataHub application resources are not accessible under their own dataspace.

Reset

If you need to start fresh and wipe the existing setup (e.g. after configuring a new base URI), you can do that using

sudo rm -rf certs data && docker-compose down -v

⚠️ This will remove the persisted data, server and owner certificates as well as their Docker volumes.

LinkedDataHub CLI wraps the HTTP API into a set of shell scripts with convenient parameters. The scripts can be used for testing, automation, scheduled execution and such. It is usually much quicker to perform actions using CLI rather than the user interface, as well as easier to reproduce.

The scripts can be found in the scripts subfolder.

⚠️ The CLI scripts internally use Jena's CLI commands. Set up the Jena environment before running the scripts.

An environment variable JENA_HOME is used by all the command line tools to configure the class path automatically for you. You can set this up as follows:

On Linux / Mac

export JENA_HOME=the directory you downloaded Jena to
export PATH="$PATH:$JENA_HOME/bin"

Get the source code

⚠️ Before running app installation scripts that use LinkedDataHub's CLI scripts, set the SCRIPT_ROOT environmental variable to the scripts subfolder of your LinkedDataHub fork or clone. For example:

export SCRIPT_ROOT="/c/Users/namedgraph/WebRoot/AtomGraph/LinkedDataHub/scripts"

How to get involved

Test suite

LinkedDataHub includes an HTTP test suite. The server implementation is also covered by the Processor test suite.

HTTP-tests HTTP-tests

Dependencies

Java

Docker

Support

Please report issues if you've encountered a bug or have a feature request.

Commercial consulting, development, and support are available from AtomGraph.

Community

About

Data-driven Knowledge Graph management system. Apache license.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 55.1%
  • XSLT 17.9%
  • Java 17.8%
  • Shell 6.5%
  • CSS 2.3%
  • HTML 0.3%
  • Dockerfile 0.1%