Skip to content

Commit

Permalink
flat storage layout (#20)
Browse files Browse the repository at this point in the history
* initial draft for a flat storage layout

* PR fix: improve limitation language

* fix typo

* rename extension

Co-authored-by: Peter Winckles <[email protected]>
pwinckles and pwinckles authored Sep 9, 2020
1 parent c87a5b4 commit d51afc5
Showing 2 changed files with 69 additions and 0 deletions.
68 changes: 68 additions & 0 deletions docs/0006-flat-direct-storage-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# OCFL Community Extension 0006: Flat Direct Storage Layout

* **Extension Name:** 0006-flat-direct-storage-layout
* **Authors:** Peter Winckles
* **Minimum OCFL Version:** 1.0
* **Obsoletes:** n/a
* **Obsoleted by:** n/a

## Overview

This storage root extension describes a simple flat OCFL storage layout. OCFL object identifiers are mapped directly to directory names that are direct children of the OCFL storage root directory.

The limitations of this layout are filesystem dependent, but are generally as follows:

* The size of object IDs cannot exceed the maximum allowed directory name size (eg. 255 characters)
* Object IDs cannot include characters that are illegal in directory names
* Performance may degrade as the size of a repository increases because every object is a direct child of the storage root

## Parameters

This extension has no parameters.

## Procedure

The OCFL object identifier is used, without any changes, as the object's root path within the OCFL storage root.

## Examples

### Example 1

This example demonstrates some mappings that produce directory names that are valid on unix filesystems.

#### Mappings

| Object ID | Object Root Path |
| --- | --- |
| object-01 | `object-01` |
| ..hor\_rib:lé-$id | `..hor_rib:lé-$id` |

#### Storage Hierarchy

```
[storage_root]/
├── 0=ocfl_1.0
├── ocfl_layout.json
├── object-01/
│   ├── 0=ocfl_object_1.0
│   ├── inventory.json
│   ├── inventory.json.sha512
│   └── v1 [...]
└── ..hor_rib:lé-$id/
   ├── 0=ocfl_object_1.0
   ├── inventory.json
   ├── inventory.json.sha512
   └── v1 [...]
```

### Example 2

This example demonstrates some mappings that produce directory names that are invalid on unix filesystems; therefore this layout cannot be used in a repository that needs to be able to store objects with IDs like these.

#### Mappings

| Object ID | Object Root Path |
| --- | --- |
| info:fedora/object-01 | `info:fedora/object-01` |
| abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij | `abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij` |

1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# OCFL Community Extensions

* [0001: Digest Algorithms](0001-digest-algorithms.md)
* [0006: Flat OCFL Storage Layout](0006-flat-layout.md)

0 comments on commit d51afc5

Please sign in to comment.