Configuration

You need to set the following environment variables for rdfDB.
  1. RDFDB_DIR : rdfDB creates a directory for each database in the directory that is the value of RDFDB_DIR. You need to have right permissions for this directory so that rdfDB can create the subdirectories and files it needs.

    In the directory for each database are three files findex.db, rindex.db and arcindex.db.

  2. RDFDB_PORT : set this to something like 7001 (or whichever port you want the rdfDB service to be available at).

You can run rdfDB from the command line like this :

shell>nohup ./rdfdb &
It will print out the version number.

Using rdfDB

At this point, one can only connect to rdfDB by telneting into the port specified by RDFDB_PORT and issuing queries.

There is a perl library to issue queries and get answers which can be downloaded from here. The perl library needs to be made into a DBI driver. I am also planning on providing a C client library.

rdfDB connections are very lightweight and can easily be created and terminated. rdfDB is multi-threaded and each connection gets its own thread. Right now, a new thread is created for each connection, but I plan to switch to a connection pool soon.

Queries are terminated with the string "</>". The response is zero or more lines, followed by the line

<result-code> </>
The result codes are described here. The result code 0 represents successful completion of the request. The last line is the only one which may contain </>.