Here is found details of the locations and purposes of the Fedora 4 configuration files. For details on how to enable and configure these options, see this page. |
Fedora RESTful HTTP API uses the open source Jersey RESTful Web Services framework that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation. The jersey servlet dispatcher is configured in web.xml as follows:
<servlet> <servlet-name>jersey-servlet</servlet-name> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>org.fcrepo</param-value> </init-param> <init-param> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> |
The following spring files exist in a directory as configured in web.xml, which contains a context-param element with param-name "contextConfigLocation". The param-value points to your spring context configuration files, WEB-INF/classes/*.xml. Note that these files are in the source tree under fcrepo-webapp/src/main/resources/spring and copied to WEB-INF/classes upon build.
<bean name "modeshapeRepofactory" class= "org.fcrepo.kernel.spring.ModeshapeRepositoryFactoryBean"> <property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:classpath:/config/single/repository.json}"/> </bean> |
Fedora 4 uses Modeshape, a JCR implementation. We distribute a handful of known-good configurations for Modeshape and Infinispan, although we anticipate configuration tuning for deployment environments will be common.
http://docs.jboss.org/infinispan/5.3/configdocs/
These configuration files are copied to WEB-INF/classes from fcrepo-configs/src/main/resources upon build.
These configuration files are copied to WEB-INF/classes from fcrepo-configs/src/main/resources upon build.
fcrepo.modeshape.query.enabled:true fcrepo.modeshape.query.mode:sync |
Fedora 4 uses the Modeshape query index to power administrative search APIs. It can be disabled (or switched to asynchronous mode) to improve performance (see below).
fcrepo.modeshape.index.location:target/indexes fcrepo.infinispan.cache_configuration:config/infinispan/leveldb-default/infinispan.xml |
Fedora 4 can be configured to use different Infinispan configurations. By default, Fedora 4 configurations use the leveldb-default configuration.
fcrepo.ispn.repo.CacheDirPath:target/FedoraRepository/storage |
Fedora 4 will store object properties to fcrepo.ispn.repo.CacheDirPath. These probably won't be very large, and should be stored on fast disk. The object properties are stored as binary JSON documents within the given cache store configuration.
fcrepo.binary-store-path:target/binaries fcrepo.ispn.binary.CacheDirPath:target/FedoraRepositoryBinaryData/storage |
fcrepo.ispn.binary.CacheDirPath:target/FedoraRepositoryBinaryData/storage - path to store binary content (when it's stored in infinispan e.g. /config/infinispan/clustered/infinispan.xml)
Fedora 4 stores binary content separately (to one of the above paths, depending on configuration). These files are stored hashed by the content SHA-1 hash.
If your application does not use the query index (which powers basic administrative search, and the simple fcr:sparql endpoint), you can significantly improve repository performance by disabling indexing, or using asynchronous indexing instead.
fcrepo.modeshape.query.mode = async fcrepo.modeshape.query.enabled = false |
Setting | Average (s) | Median (s) | Standard Deviation |
---|---|---|---|
mode=async | 0.0781 | 0.0680 | 0.0477 |
enabled=false | 0.0736 | 0.0630 | 0.0445 |
mode=sync | 0.1689 | 0.148 | 0.0685 |
Different Infinispan configurations can also have an impact on repository performance.
Infinispan Configuration | Average | Median | Standard Deviation |
---|---|---|---|
filecachestore | 0.1121 | 0.105 | 0.0313 |
leveldb | 0.0736 | 0.0630 | 0.0445 |
leveldb with async persistence | 0.0610 | 0.0550 | 0.0220 |
RAM | 0.0517 | 0.0480 | 0.0148 |
leveldb with file binary store * | 0.0644 | 0.0570 | 0.0196 |
Total | 0.0703 | 0.0590 | 0.0318 |
* default configuration
Defining .cnd files such as these in repository.json will register namespaces and node types found within:
Alternatively from definition in .cnd files as above, forms are available to add namespaces and nodetypes at these URL endpoints:
http://<host>/rest/fcr:namespaces
http://<host>/rest/fcr:nodetypes
This XACML Authorization Delegate Module is based on the design documented here: XACML Authorization Delegate
policy set for the admin role
define the policies for the admin role
policy set for the basic role
define the policies for the basic role
policy set that prevents access to any files with the mime type "image/tiff" that have the "http://example.com/mixins#master" type (example-mixins:master mixin)
policy set for reading normal nodes
define the policies for the reader role
policy set for writing normals nodes.
define the policies for writing the normal nodes
namespace properties to enable XACML authorization
This is an indexer that listens to the Fedora JMS topic, retrieves a message including pid and eventType, looks up object properties, gets and passes the transformed or untransformed properties on to any number of registered handlers.
bean implementation for HttpSolrServer, SolrIndexer and IndexerGroup (SparqlIndexer, FileSerializer)
config for jms messaging with ActiveMQ
logging configuration
namespace property to enable object indexing using triplestore and solr