Running a Sesame Server on AllegroGraph
AllegroGraph is a RDFstore (triplestore) application written by Franz Inc.. It comes in both Java and Lisp editions. I have been using the Lisp edition. Setting up a repository is fairly straightforward and there are instructions on how to do this at:
http://agraph.franz.com/allegrograph/doc/lisp/agraph-tutorial.html
I have had slightly more difficulty setting up a sesame server so that I can communicate with the repository remotely. A guide for the protocol is provided at:
http://agraph.franz.com/allegrograph/doc/java/http-protocol.html
but it doesn't explain expecially clearly how to set up the server and start using it. Below is a guide on how to acheive this:
- Start the alisp application provided as part of AllegroGraph.
- Type in the following commands one at a time:
(require :agraph) (in-package :triple-store-user) (setf *synchronize-automatically* t) (make-sesame-server :start (list :port 8010))
Now you should have a sesame server up a running you need a client to connect to it. I decided to use the Zend Framework, which contains a http client library that can be used to be a client to interface with the sesame server, as follows:
- Download the latest version of the Zend Framework.
- Use the Zend Framework QuickStart to build up the framework. I suggest creating this in you own filespace.
- Create a symbolic link from a servable folder (e.g. /var/www/) to link to the public folder in the framework that you have built:
ln -s /home/<username>/QuickStart/public/ zend
This should allow you to access index.phtml from http://localhost/zend/. - Copy index.phtml into the application/views/scripts/index/ directory of the Zend Framework directory structure.
- Now by going to http://localhost/zend/ it should be possible to load up a form interface entitled HTTP Test for AGraph Sesasme Server.
- This form can be used to perform commands from AllegroGraph's Sesame Server Protocol.
- The HTTP client provided by the Zend Framework as far as I can work out is not fully implemented so does not support sending a body or setting the Accept or Content-type values in the request header. I have modified library/Zend/Http/Client.php so that it can send this values in a request.