Versions Compared

Key

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

...

Modeshape's federation overview provides more background on how federation works and the underlying concepts.

Note: The term "projection" is sometimes used as a synonym for the "federation" feature.

Filesystem Federation

Filesystem federation maps a node in the repository to a directory on disk.  This allows files on disk to be served and updated by Fedora 4 as though they were in the repository.  Filesystem federation avoids having to transfer files using HTTP – and with larger file sizes (or with larger numbers of files being processed), this can improve performance significantly.  If you are ingesting a large number of multi-gigabyte files, we recommend you consider filesystem federation.

...

Note

Some users have had problems when adding properties to federated files.  This feature should be considered experimental at this time.

Configuration

An example filesystem federation configuration to include in your Modeshape repository.json :

Code Block
"externalSources" : {
    "federated-directory" : {
        "classname" : "org.modeshape.connector.filesystem.FileSystemConnector",
        "directoryPath" : "/path/to/files",
        "projections" : [ "default:/federated => /" ],
        "contentBasedSha1" : "false",
        "readOnly" : true,
        "extraPropertiesStorage" : "none"
   }
}
  • directoryPath - base directory for all files shared with the repository.
  • projections - lists one or more mappings from the repository to the filesystem.  The format is "{workspace}:{repository path} => {filesystem path}".

  • contentBasedSha1 controls - controls how internal identifiers are computed for files.  By default (contentBaseSha1 = true), Modeshape computes the SHA-1 checksum of a file's content every time the file is accessed.  For small files this creates a modest overhead.  For large files, however, this dramatically reduces performance, since generating the checksum can take several seconds per gigabyte of data.  For this reason, we recommend setting contentBasedSha1 to false when serving files larger than 100MB.

  • readOnly - controls whether the contents of the filesbase directory for all files shared with the repository .are read-only

  • extraPropertiesStorage - sets the format for storing "extra" properties (properties that can't be set using filesystem attributes).  Recommended values are "json" for the current JSON properties format, or "none" for disabling extra properties.

Modeshape's FileSystemConnector documentation and configuration provide additional information about configuring the filesystem connector.

...