Skip to content

How Fedora maps objects to OCFL

Anusha Ranganathan edited this page Nov 15, 2022 · 2 revisions

From the Fedora 6 page https://wiki.lyrasis.org/display/FEDORA6x/OCFL+Repository, the highlights are:

Fedora uses the Hashed N-Tuple Storage Layout Extension to map OCFL object IDs to storage locations within the OCFL storage root. All of the extension's default settings are used.

In most cases, Fedora resource IDs are mapped directly to OCFL object IDs. For example, the resource ID "foo/bar" is internally represented as "info:fedora/foo/bar", and is mapped directly to an OCFL object ID, which is turn mapped to the path FCREPO_HOME/data/ocfl-root/70c/b11/831/70cb11831eda669bfa7ccbe0996d3df06186f47a6f3544cabff61b3f79509d73. This is the path where all of the data related to the "foo/bar" resource can be found.

What doe this mean?

  • The object Id (prefixed with info:fedora/) is converted to its sha256 digest. This is used as the OCFL object ID on disk.

  • Fedora uses the Hashed N-Tuple Storage Layout Extension to map OCFL object IDs to storage locations within the OCFL storage root. In particular, it uses the format as documented in example 1.

    Parameters

    {
        "extensionName": "0004-hashed-n-tuple-storage-layout",
        "digestAlgorithm": "sha256",
        "tupleSize": 3,
        "numberOfTuples": 3,
        "shortObjectRoot": false
    }
    

    Storage Hierarchy

    [storage_root]/
    ├── 0=ocfl_1.0
    ├── ocfl_layout.json
    ├── extensions/
    │   └── 0004-hashed-n-tuple-storage-layout/
    │       └── config.json
    ├── 3c0/
    │   └── ff4/
    │       └── 240/
    │           └── 3c0ff4240c1e116dba14c7627f2319b58aa3d77606d0d90dfc6161608ac987d4/
    │               ├── 0=ocfl_object_1.0
    │               ├── inventory.json
    │               ├── inventory.json.sha512
    │               └── v1 [...]
    └── 487/
        └── 326/
            └── d8c/
                └── 487326d8c2a3c0b885e23da1469b4d6671fd4e76978924b4443e9e3c316cda6d/
                    ├── 0=ocfl_object_1.0
                    ├── inventory.json
                    ├── inventory.json.sha512
                    └── v1 [...]
    

Uploading files

  • How are they stored on disk?

    • What object Id used?
  • What happens when the same file is uploaded?

    • To a different container?
    • To the same container?

Clone this wiki locally