Nanopub Query is the second-generation query service for nanopublications.
You can check out Nanopub Query at these instances:
Each nanopublications is loaded into different repos in the form of RDF4J triple stores. There are these general repos:
meta
: Stores some specific "admin-graph metadata" of the nanopublications (see below), but not the nanopublications themselvesfull
: Stores all nanopublications in full and their admin-graph metadata (this is not scalable on the long term, so will be deprecated in the medium-term future)last30d
: Stores all nanopublications of the last 30 days and their admin-graph metadatatext
: Stores all nanopublications for full-text searchadmin
: Stores some further admin info, such as the full pubkeys for their hash valuesempty
: Empty repo from which other repos can be accessed via the SPARQLservice
keyword
On top of that, there are these specific repos:
pubkey
: For each public key used to sign a nanopublication, a separate repo is createdtype
: For each nanopub type, a separate repo is created too
Two admin graphs (npa:graph
and npa:networkGraph
) are created with metadata about the nanopublications.
The admin triple table shows the details.
Get pre-packaged data (optional):
$ wget https://zenodo.org/records/14260335/files/rdf4j-20241202.tar.gz
$ tar -xzf rdf4j-20241202.tar.gz
Init directories:
$ ./init-dirs.sh
Check docker-compose.yml
and make any adjustments in a new file docker-compose.override.yml
.
In the near future, Nanopub Query will get its initial nanopublications and regular updates via the Nanopub Registry, which isn't yet available.
So, currently, it relies on a small autofetch script to get the initial nanopublications, and then needs to connect to a nanopub-server instance to get regular updates.
To receive updates from such a nanopub-server instance, e.g. via signed-nanopub-services, that nanopub-server needs to be configured to send new nanopublications to the Nanopub Query instance like this:
services:
server:
environment:
- 'NPS_POST_NEW_NANOPUBS_TO=https://query.example1.com/ https://query.example2.com/'
There is a deadlock problem with RDF4J (details), which requires some specific web server configuration to work around it. Specifically, concurrent requests per repo have to be avoided, with a configuration like in this nginx example.
Start with Docker Compose:
$ sudo docker compose up -d
Copyright (C) 2024 Knowledge Pixels
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.