...
Table of Contents | ||
---|---|---|
|
fcrepo-webapp
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:
...
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 a spring context configuration file "WEB-INF/classes/spring/repository.xml". This configuration file imports a settings file located in the same directory or the file specified by system property {{fcrepo.spring.configuration
}}. Note that these files are in the source tree under fcrepo-webapp/src/main/resources/spring and copied to WEB-INF/classes upon build.
...
- specify the repository.json file to be loaded as the repositoryConfiguration or use the
fcrepo.modeshape.configuration
system property. - bean for repository factory and metrics
- repository factory parameter for serverManagedPropertiesMode
- bean implementation for InternalIdentifierConverter (identifier translationChain), StoragePolicyDecisionPointImpl, SessionFactory, and base-packages to auto scan into spring
- bean implementation for eventing - observer, filter, event bus
- specify the implementation for processing events
- config for transactions
- bean implementation for minting identifiers
...
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/
Repository Config Options
These configuration files are copied to WEB-INF/classes from fcrepo-configs/src/main/resources upon build.
...
cacheSize
- The
cacheSize
option may be set to specify the size of the Modeshape node cache. The default value is 10,000, and increasing this value can improve performance, particularly for the Many Members performance issue. See the example configuration files, such as file-simple/repository.json for an example.
/config/clustered-mysql/repository.json
...
- Configuration for file-based object store for testing, not recommended for production.
/config/jdbc-mysql/repository.json
- Configuration for MySQL-based object store.
/config/jdbc-postgresql/repository.json
...
- Configuration for PostgreSQL-based object store.
...
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.
Performance considerations
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
Other module resources
fcrepo-module-auth-xacml
This XACML Authorization Delegate Module is based on the design documented here: XACML Authorization Delegate
/src/main/resources/policies
AdminPermissionPolicySet.xml
policy set for the admin role
AdminRolePolicySet.xml
define the policies for the admin role
GlobalPermissionPolicySet.xml
policy set for the basic role
GlobalRolesPolicySet.xml
define the policies for the basic role
PreventReadingMasterFilesPolicySet.xml
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)
ReadNormalNodePermissionPolicySet.xml
policy set for reading normal nodes
ReadOnlyExceptToLocalPolicySet.xml
- policy set that prevents all repository-changing actions by all but those a localhost or on an internal network.
ReaderRolePolicySet.xml
define the policies for the reader role
WriteNormalNodePermissionPolicySet.xml
policy set for writing normals nodes.
WriterRolePolicySet.xml
define the policies for writing the normal nodes
/src/main/resources/cnd
xacml-policy.cnd
...
Parallel stream processing
Code Block |
---|
fcrepo.streaming.parallel:false |
If you are running Fedora on a multiprocessor machine you can level parallel processing across single requests by turning this option on. Parallel processing of streams can boost the retrieval speeds of the RDF associated with objects with large numbers of inlinks (ie dependent objects with memberOf associations). Enabling this option in conjunction with increasing with cacheSize parameter in your repository.json file can boost retrieval speeds significantly.
Skolemizing to Hash-URIs
Code Block |
---|
fcrepo.bnode.hash-uri=<true|false> |
With this property set to 'true', Fedora will skolemize incoming blank nodes to hash-URIs (with UUID fragments) on the base URI to which the request was addressed. By default this feature is turned off for backwards compatibility.