Skip to content

Instantly share code, notes, and snippets.

Created May 13, 2015 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/b40df8ab4f02a4457ccf to your computer and use it in GitHub Desktop.
Save anonymous/b40df8ab4f02a4457ccf to your computer and use it in GitHub Desktop.
Getting started with OpenRDF Sesame (RDF4j)

Sesame is a J2EE application that is contained in a servlet. This is generally deployed using Tomcat, but we are not going to use that or anything bloatware. Instead we will make use of Winstone, a lightweight application server.

Sesame is composed of two servlets. openrdf-sesame that is best served at /openrdf-sesame and that contain the HTTP REST API to the RDF store. Then there is openrdf-workbench (served from /openrdf-workbench) that is the UI to the server. You don't really need the UI but it's nice to get started and explore the server.

Running the server

  • First thing, download OpenRDF Sesame SDK

  • Uncompress the downloaded archive. You should have a war directory containing:

      openrdf-sesame-2.8.3/war/openrdf-sesame.war
      openrdf-sesame-2.8.3/war/openrdf-workbench.war
    
  • Download winstone-boot.jar from the maven central. For those who don't know, maven is to Java what gem is for Ruby and npm for Node.

  • Execute winstone with the two servlets:

      java -jar .../winstone-boot-1.7.0.jar --webappsDir=.../openrdf-sesame-2.8.3/war --port=8080
    

You can now connect to [http://localhost:8080/openrdf-workbench]

@tomzx
Copy link

tomzx commented Jan 26, 2017

Using RDF4j 2.1.6 (sesame successor), you can start both web apps, however if you try to create a new repository, you will face https://openrdf.atlassian.net/browse/SES-2240, which means that you basically cannot create a new repository and thus cannot really use RDF4j with winstone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment