How-to install a Sesame RDF server

[An english translation of the previous french article]

Every profession has its own tools. For the emerging professions of the semantic web, RDF repositories will become the foundations of the semantic pyramid, a tool that every « semantic worker » will use; maybe one day, when referring to these « semantic workers », we will speak about « semantic manager », or « semantic architects »… Anyway these RDF repositories are talking about promising performances for growing amounts of data : they are reaching one billion of triples, and that is the focus of the next « semantic web challenge » (see also here and there). This remains however ridiculously small compared to relationnal databases, that can store terabytes of data; especially when you consider that, in order to garantee optimal performances on complex queries and inference, RDF databases are generally all loaded into memory…

But not everyone needs a billion-triple-large RDF database, and you can start working with such a tool by installing the Sesame RDF server. This will give you access to :

  • A remote RDF server;
  • RDFS inference; RDFS inference is formally described here. among other things, these rules define that if A subclassOf B and B subclassOf C, then A subclassOf C, and if A rdf:type B and B subclassOf C, then A rdf:type C;
  • SPARQL endpoint and query capability;
  • An administrative console to import/export RDF in/from the server;

Before you begin make sure Java is installed on your machine.

  1. Download Sesame from http://www.openrdf.org/download.jsp, and make sure you take version 2 (2.0.1 as of today), and you choose the « SDK » (development kit);
  2. Download JBoss from http://labs.jboss.com/jbossas/downloads/, and choose for example the version 4.2.0. Note that Sesame also works on Tomcat;
  3. Unzip Sesame and JBoss in the directories of your choice;
  4. Copy the Sesame files <sesame>\war\openrdf-sesame.war and \war\openrdf-workbench.war in the JBoss directory <jboss>\server\default\deploy
  5. Run Jboss by running <jboss>\bin\run.bat. After a minute or two, once Jboss is started, verify that you can access the Sesame administration console by pointing your browser to http://localhost:8080/openrdf-workbench;
  6. Now we need to setup Sesame with a few parameters : we need an in-memory repository (for good performance), and saved on the disk (so that the data is not lost when the server is stopped). In order to do that, use the Sesame console application by launching <sesame>\bin\start-console.bat;
  7. Inside the Sesame console, type in the following commands :
    • connect http://localhost:8080/openrdf-sesame. (don’t forget the dot at the end of this command, like all the followings).
    • open SYSTEM.
    • create memory-rdfs-dt. Sesame asks you for a few parameters :
      1. Repository ID : TEST
      2. Repository title : TEST with RDFS inferencing (or leave the default value by hitting Enter)
      3. Persist : true (we want the repository to be saved on the disk)
      4. Sync delay : 10000 (the repository is written on the disk every 10 seconds)

      (more documentation on the Sesame console can be found at http://www.openrdf.org/doc/sesame2/users/ch07.html

    • Now we have an RDF repository. You can repeat this process if you want to create multiple repositories. Now go back to http://localhost:8080/openrdf-workbench. Select the Sesame server http://localhost:8080/openrdf-sesame (that is the default value). Click on the newly created « TEST » repository. If it does not appear, close and reopen your browser.
    • Next we can load RDF files into the repository by clicking on « Modify » in the menu on the left, and selecting for example « Upload from URL ». What could we load ? Well, Swoogle, the OWL and RDF document search engine, might be of some use to find suitable documents. Or the GEMET (GEneral Multilingual Environmental Thesaurus) thesaurus, free of use and in SKOS, can be a good example; you will need to upload the URLs http://www.eionet.europa.eu/gemet/gemet-skoscore.rdf and http://www.eionet.europa.eu/gemet/gemet-definitions.rdf?langcode=en. Set the « base URI » to : http://www.eionet.europa.eu/gemet.
    • Finally you can explore your RDF repository, either by clicking on « Explore » on the left, either by choosing « Query » to run some SPARQL queries.

Now you’ve got one more tool in your « semantic toolbox » !

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

%d blogueurs aiment cette page :