A back arrow icon.
RDFox Blog

Knowledge Graphs and Reasoning on Edge Devices: The 5 simple steps to running the world’s fastest graph database on the edge

Knowledge Graphs and Reasoning on Edge Devices: The 5 simple steps to running the world’s fastest graph database on the edge
Thomas Vout

The need for graph technology on the edge has exploded in recent times. Applications are endless and often practically beneficial but due to limitations in hardware and software technology, the reality has been underwhelming. With the latest from RDFox that’s all about to change!

With RDFox on the edge, the knowledge you use to power your solutions, to run your business, can be condensed down into a box that fits in your palm. The strength of this little box lies, among other things, in its versatility. Now for the first time, your embedded expertise sits on a portable device, pushing your logic and reasoning to the edge. Not only does this open up mobile applications such as vehicle automation, it also creates the opportunity for reasoning in semi-connected or disconnected devices. Suddenly remote IoT use cases become viable, as do those that require consistent reliability such as medical support, or high security like the handling of private information on a mobile phone. All this and more, now a reality with RDFox.

In this article we’ll show you how to install and run RDFox — the world’s most performant knowledge graph and reasoning engine — on your very own edge device, the Raspberry Pi Zero.

Please bear in mind this can be done with other edge devices but, as it happened, we had a Pi Zero to hand.

Prerequisites

Access to a raspberry Pi installed with a 64-bit OS (Wi-Fi and SSH enabled):

· Raspberry Pi Zero (the Pi we used)

· 64-bit OS

An RDFox license

Step One: The Setup

Having logged onto the Pi, you need to create a directory in which to store your RDFox license. You can do this by running:

mkdir .RDFox

Next, find and note the IP of your Pi. If you’re connected with a monitor and keyboard, you can do this with the command:

ifconfig
Since we're using a Wi-Fi connection, our Pi IP can be seen under the 'wlan0' header.

Step Two: Your RDFox License

As always you’ll need a license to run RDFox.

If you don’t have a license, you can request one for free!

You’ll need to move your license over to the directory you just created.

There are several ways to transfer a file to a Pi, but in this case, we found that the easiest way to copy it from your main computer connected to the same network.

Enter the following command on your main machine:

scp <Licence folder location>/RDFox.lic pi@<IP address of the RPI>:~/.RDFox/

Replace <Licence folder location> with the file path of your newly acquired license and <IP address of the RPI> with, you guessed it, the IP address of your raspberry PI.

Step Three: Downloading RDFox

(Optional SSH Remote Login)
If you chose the lightweight OS (without a desktop) you might find it easier to run the following commands remotely. To establish a remote SSH connection with the Pi, execute the following from your main computer:

ssh pi@<IP address of the RPI>

Through a browser, go to the RDFox download page and copy the URL for the latest RDFox Linux ARM Image.

You’ll now need to download the latest version of RDFox onto the Pi using the copied URL.

Begin the download with:

wget <Image URL>

Step Four: Unzipping the Image

Before starting RDFox, you first need to unzip the image with:

unzip RDFox-linux-arm64–5.7.zip

(Remember to update the version number accordingly)

Step Five: Running RDFox on a Raspberry Pi

Now all that’s left is to start RDFox. Simply do this as you would in any other instance. For the purposes of this article we’ll start it in sandbox mode.

RDFox-linux-arm64–5.7/RDFox sandbox .

To access this instance of RDFox from another computer on the network (as is often convenient), you need to open the endpoint.

As per usual, that is achieved with the command:

endpoint start

Now from any machine on the same network, open a browser to the RDFox endpoint at:

http://<IP address of the RPI>:12110/console/

From here you can create a datastore, import data and rules, query the database and explore the results — the entirety of the console functionality is at your disposal. What you do with it is up to you.

Take a look at our video tutorial series if you want something to follow along.

Here is a small visualisation of the graph that we created in homage to the device.

While a very simple procedure, the significance of what you’ve just created should not be overlooked. The world's most powerful graph database now fits in your palm, running on a £12 computer. Having created an instance of RDFox on the edge, an almost unlimited catalogue of use cases has become available to you. Whether it’s on-location analytics, mobile automation, or industry 4.0, if you have a solution in mind, you can build it with RDFox.

If you’re new to RDFox or in need of a refresher, check out our getting started guide for the next steps in any solution.

Take your first steps towards a solution.

Start with a free RDFox demo!

Take your first steps towards a solution.

Get started with RDFox for free!

Team and Resources

The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data-intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin-out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Enterprises (OSE) and Oxford University Innovation (OUI).