Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To get hands-on experience with the indexer and see updates synced with an external triplestore, you need three components. Each component will potentially run in its own application container. The three components are:

  1. Triplestore (Fuseki or Sesame)
  2. Fedora 4 Repository
  3. JMS Event listener/indexer

The triplestore and Fedora4 do not need to be aware of each other or of the jms-event-listener. However, the event-listener needs to know the web-endpoints of both the triplestore and Fedora 4. It is therefore important that you start the three components on different ports. 
Instructions on how to start up and configure the three components follows:

1. Triplestore
2. Fedora Repository

$ git clone https://github.com/futures/fcrepo4.git
  
$ cd fcrepo4
$ MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m" mvn install
$ cd fcrepo-webapp
$ MAVEN_OPTS="-Xmx512m" mvn jetty:run

...

You can deploy Fedora4 either by downloading the latest war file and dropping it into an application container (e.g. Tomcat7). Or you can clone the Git fcrepo4 project and run the fcrepo-webapp directly within the code base.
See the following pages for details on either approach:

3. JMS Event Indexer

You can deploy the jms-event-listener by downloading the latest war file and dropping it into an application container (e.g. Tomcat7). Or you can clone the Git fcrepo-jms-indexer-pluggable project and run the fcrepo-jms-indexer-webapp directly within the code base.

It will likely be easier to configure the jms-event-indexer by building the application from source.
You can specify the connection to either Fuseki or Sesame in the following configuration file.

  • By default, Fuseki is expected
  • To connect to Sesame instead, comment out the "queryBase", "updateBase", and "formUpdates" XML elements associated with Fuseki, and uncomment the corresponding Sesame XML elements in the configuration file mentioned above.

To configure the jms-event-indexer to connect to the Fedora Repository, you can set the following system variables

  • -Dfcrepo.host=<defaults.to.localhost>
  • -Dfcrepo.port=<defaults.to.8080>

To configure the jms-event-indexer to connect to the triplestore, you can set the following system variables

  • -Dfuseki.host=<defaults.to.localhost> 
  • -Dfuseki.port=<defaults.to.3030>

... or if you are using Sesame:

  • -Dsesame.host=<defaults.to.localhost> 
  • -Dsesame.port=<defaults.to.8081>

Below is an example of how to download, build, and start the jms-event-indexer

Code Block
$ git clone https://github.com/futures/fcrepo-jms-indexer-pluggable.git
  

...


$ cd fcrepo-jms-indexer-pluggable

...


$ mvn install

...


$ cd fcrepo-jms-indexer-webapp

...


$ mvn -Dfcrepo.host=localhost -Dfcrepo.port=8080 -Dfuseki.host=localhost -Dfuseki.port=3030 -Djetty.port=8081 jetty:run

...

The If the Fedora Repository will is be running at http://localhost:8080/rest/ – you can create, update and delete objects and datastreams using your browser, or using the REST API (see SPARQL Recipes).  Each event will trigger the indexer and be synced to Fuseki (or Sesame), which you can access at http://localhost:3030/ (if you have Fuseki running on its default port).