Warning: This document is for an old version of RDFox. The latest version is 7.0.

7. Managing RDFox Servers

As explained in Section 4, each running RDFox instance contains a server object, which acts as a top-level container for all information stored in the instance. A server supports operations such as creating and deleting data stores, creating and deleting roles, and granting permissions to roles.

7.1. The Server Directory

Each instance of the RDFox server has its own server directory where it persists roles and data stores (depending on configuration), and which is used as the default location for other files read or written by RDFox. The server directory path is set when the RDFox server instance is started (see the server-directory parameter below) and cannot be changed thereafter.

Depending on configuration, the server directory is used in the following situations:

  • for persisting access control settings (see persist-roles server parameter below)

  • for persisting data stores (see persist-ds server parameter below)

  • as the default location for API logs to be written to (see api-log and related settings below)

  • as the default location for the RDFox license key (with file name RDFox.lic)

To protect the integrity of the server directory, RDFox attempts to acquire an exclusive lock over the directory at startup if role persistence is enabled and holds the lock for the duration of the server’s lifetime. This prevents multiple running servers from using the same server directory concurrently. In addition, RDFox prohibits the use of data store persistence in the absence of role persistence. This ensures that data cannot be stored without matching access control policies.

7.2. Server Parameters

When a server is instantiated, it can be given a number of parameters that govern various aspects of the server’s operation. All parameters are specified as key-value pairs. If an RDFox instance is started from the command line, the server parameters are passed as arguments to the RDFox (on Linux and macOS) or RDFox.exe (on Windows) executable as described in Section 16.1. If an RDFox instance is started from Java, the server parameters can be specified as arguments to the tech.oxfordsemantic.jrdfox.client.ConnectionFactory.startLocalServer() method; please refer to the Javadoc for more information. The following table describes all available server parameters.

Option

Value

Description

allowed-schemes-on-load

a string containing a space-separated list of URI schemes

Specifies a space-separated list of schemes that are allowed to be used in the SPARQL 1.1 LOAD update and to import from IRIs. The default value is https rdfox (rdfox is used to import TBoxReasoning as described in Section 6.6.6)

api-log

on or off

If the value is on, all API calls are recorded in a script that the shell can replay later. later. The default value is off. See Section 17.1 for more information.

api-log.directory

a string

Specifies the directory into which API logs will be written. Default is directory api-log within the configured server directory.

api-log.input-recording-limit

0, a positive integer or unlimited

Limits the amount of each input that is recorded during import operations as a part of an API log to the specified number of bytes. The value unlimited, which is the default, signifies that each each input should be recorded in its entirety.

license-content

a string

Specifies the license content verbatim. This parameter is not set by default. See Section 2.4.3 for the precedence of license-related options.

license-file

a string

Specifies the path to the license file to use. The default value is <server-directory>/RDFox.lic. See Section 2.4.3 for the precedence of license-related options.

max-memory

an integer

Specifies the maximum of memory (in MB) that the RDFox instance is allowed to use. The default is 0.9 times the installed memory.

num-threads

an integer

Specifies the number of threads that the system will use for tasks such as reasoning and importation. The default is the number of logical processors available on the machine.

persist-ds

file or off

If the value is file, data stores and their content will be incrementally saved (persisted) to files in the server directory. Must be off if persist-roles is off. Default value is off for JRDFox and depends on the mode for the RDFox executable.

persist-roles

file or off

If the value is file, RDFox will persist roles, their privileges, and their memberships to a file in the server directory. Default value is off for JRDFox and depends on the mode for the RDFox executable.

server-directory

a string

Specifies the server directory. A directory may only be used by one RDFox server at a time. The default value is $HOME/.RDFox on Linux/Mac, and %LOCALAPPDATA%\RDFox on Windows.