Get Started With RDFox On AWS Marketplace

About RDFox

Richard Loveday
DataLens
5 min readFeb 25, 2021

--

RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. RDFox is a main-memory data store that allows users to efficiently manage graph-structured data represented according to the RDF data model and query that data using the SPARQL 1.1 query language. RDFox also enables intelligent information processing by providing means for representing and reasoning with domain knowledge in the form of rules and ontologies. Rules in RDFox can be represented using an extension of the Datalog language, whereas ontologies can be represented in the standard OWL 2 language and in the Semantic Web Rule Language, SWRL. Oxford Semantic Technologies’ RDFox product is supported on the AWS Marketplace by Data Lens Labs Ltd.

Subscribing To RDFox On AWS Marketplace

The First thing we need to do is to subscribe to RDFox in AWS MarketPlace.The link to follow for RDFox is here. From this product, page click Continue to Subscribe.

On the following page, click Continue to Configuration.

On the next page, click Continue to Launch

On the final page, there is a quick stack creation link for RDFox which you can click on to start the process of deploying the knowledge graph.

Deploying The RDFox CloudFormation Stack

Once on the CloudFormation Quick create stack page there are only 2 fields we need to fill out. KeyName will allow us to select the name of an existing EC2 KeyPair to enable SSH access to the ECS instances and RDFoxDataStoreName is the name of the initial single data store/repository that the stack creates for the RDFox instance. All the other fields have defaults that can be left as they are for this quick start or can be amended as you so wish.

The default EC2 instance type t2.large has 8GB memory and 2 cores. RDFox uses between 50 and 100 bytes of memory per triple with the use of named graphs moving towards the higher end of this range so with 8GB of memory the default t2.large instance used by the template will store between 80 to 160 million triples. Having more cores means you can import in parallel; that rules can be materialised in parallel where possible; and that you can answer more queries per second, as these are answered in parallel. This should be kept in mind when deciding to change the default EC2 instance.

Finally, tick the checkbox to acknowledge that AWS CloudFormation might create IAM resources and press Create Stack.

Once the stack creation has completed if we go to the Outputs tab we will see there are 3 Outputs from the stack, BastionHostName, RDFoxFirstRolePassword, and RDFoxLoadBalancerName.

Accessing The New RDFox Instance

Now the stack is up we can use the RDFox console to interact with our RDFox instance. As the instance is in a private subnet accessible only through the bastion host we have to create an ssh tunnel from the terminal on our local machine through the bastion host to our RDFox instance. The format for this command is as follows

We provided the key file name as one of our parameters. The loadbalancer dns name and bastion host dns name are both provided as Outputs from the stack. Putting these into the above format we have the command

After using this command in our local terminal we should be able to reach the RDFox console in a browser at localhost:8080/console where we will be prompted to enter our username and password.

We have our username from the parameters which we entered for the stack which was admin. For the password, we have the output from the stack RDFoxFirstRolePassword which is the amazon resource name arn:aws:secretsmanager:us-east-1:310141400205:secret:RDFox-With-Persistence-RDFoxFirstRolePassword-hVgz2H. If we go to the AWS Secrets Manager we will find the following secret

clicking onto the secret name we will be taken to the secret details page where we can retrieve the secret value as plain text to enter into the console password field

We now have full access to the RDFox console and can select and query our data store.

In addition to the console we can also use the ssh tunnel to interact with RDFox via its RESTful API. Details of the endpoints available including the SPARQL endpoint are included in the RDFox documentation here. NB The endpoints will already be active and do not need to be started by a shell command. For further information on how to work with RDFox the full user documentation can be found here

--

--