Redirecting Data Sources

Available from 0.9.9 2703

Driver redirection is a feature of ARDI to allow you to set up testing/development systems that use different data source addresses (or even completely different drivers) without disrupting the sites existing configuration.

It allows you to specify a different address for a specific data source, that only applies when the system is running on a given IP address.

Configuring

First, open your Site Folder.

If you don't already have one, create a redirection folder in the root of your site folder.

Inside the folder, create a text file that has a name in the following format…

<ip address>-<assetid>-<context>-<mode>.txt

Where 'assetid' is the ID of the data source asset, 'context' is the ID of the context, and 'mode' is '0' for live data and '1' for historical data.

The file contains the new address string.

Worked Example

For example, let's assume that when we bring our customers ARDI database back to our development machine, we want to read all of our 'live' data from a simple tab-delimited text file instead of OSI Pi.

Our database short code is 'testing'

First, we gather the details we need.

  • Go to 'Administration|Data Sources' and find that the ID of the 'PI Server' data source is '993'.
  • Go to 'Administration|Contexts' and find that the ID of our 'Actual' context is '1' (this is true of all ARDI databases).
  • Verify the IP address of the machine (192.168.2.5)
  • Get the connection and table details

Now, we create the redirection file.

  • On Windows, go to C:\Program Files (x86)\Optrix\ARDI\web\sites\testing or on Linux, go to /opt/ardi/web/sites/testing.
  • Create a file called 192.168.2.5-993-1-0.txt
  • Edit the file, to contain the following…
c:\windows\temp\mydatafile.txt^0^1^\t

The Results

Using this method, when a driver asks this specific server for the address of this data source, it will come back with the connection details pointing towards a text file, rather than PI.

You could then manually launch a text driver in order to access live data from text rather than PI.