You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Design

  1. Driving principles:
    1. Minimizing change to the user via the API
    2. OCFL-isms not bleeding into Fedora API
    3. Rebuildability
    4. Compliance with OCFL
    5. Retain URLs of migrated Fedora resources
    6. Performance
    7. Reducing complexity of implementation

OCFL persistence

Architecture

  1. Retaining HTTP layer of existing Fedora codebase
  2. Replacing ModeShape persistence with OCFL storage
  3. Support for three interaction models: 
    1. atomistic (implicit) - every LDP resource maps to an individual OCFL Object
    2. archive group - hierarchy of LDP resources map into a compound OCFL Object
    3. archival-part (implicit) - an LDP resource that is a constituent part of a compound OCFL Object
  4. Eliminate "single-subject-restriction", i.e. support arbitrary RDF
  5. Fedora-specific information to be stored in the OCFL Object in a ".fcrepo/" directory
    1. i.e. Which file is the description of another file
    2. i.e. While file is an ACL
  6. Optimizing reads/lookups with an internal database
    1. proposed database model: https://docs.google.com/document/d/1MsMfhae3thmNdoFtnTUnII3mr_-OkllRs9PvgnY1fDY/edit

OCFL persistence

  1. Support for both OCFL objects:
    1. created by Fedora
    2. pre-existing, created by another application

Pre-existing OCFL storage hierarchy

  1. Fedora-imposed constraints
    1. The OCFL storage hierarchy must have a single, consistent "ocfl_layout" (i.e. the storage path mapping algorithm must be determinant)

Mapping between LDP and OCFL

Opt-in model

  1. Fedora resources may be created with an optional "archive" interaction model provided via headers.  

  2. New resources created via POST or PUT to the archive will be LDP contained by the archive and will be stored within the OCFL object representing that archive.

  3. If a resource is created without the "archive" model, new resources created via POST or PUT will be LDP contained by the parent resource, but will be stored as separate OCFL objects.

Notes/Implications

  1. At creation time, user establishes interaction model. Changing the model would require additional migration tooling.

Fedora-specific details

  1. /content/.fcrepo directory
  2. Hashing (SHA256) on LDP path of resource

Scaling

  • stateless Fedora instance(s) will scale horizontally
  • database can be clustered and/or moved to cloud  database service(RDS, Aurora, etc)
  • start with file system, scale out to  cloud object store (s3)

Bulk ingest

  1. Faster ingest rates can be achieved by users writing OCFL-compliant content directly to disk
    1. Would require Fedora to (re)scan OCFL storage hierarchy
  2. Optionally, user could write into OCFL-compliant storage in a way that includes Fedora optimizations (e.g. ".fcrepo/" directory)

Performance

  1. Many members: performance should improve significantly since list of members will be supplied by a database index (which should support a degree of in-memory caching).  No loading of modeshape nodes required.

Open questions

  1. Role of OCFL storage roots
    1. Could be valuable for multi-tenancy, but client interaction model has not been detailed
  2. What is the mapping / algorithm / relationship between:
    1. Fedora URL of LDP resource
    2. OCFL Object.ID
    3. OCFL storage path for associated OCFL Object

Implementation notes

  1. Provide new implementation of fcrepo-kernel-api that interacts with OCFL persistence
  2. Interactions with OCFL persistence should initially take advantage of the JHU OCFL client

Prototyping proposal

  1. Expose JHU OCFL client functionality with minimal HTTP endpoints
    1. Such an endpoint should implement minimal LDP interactions
  2. Use HTTP over OCFL to test:
    1. Performance bottlenecks
    2. Scale viability (e.g. NLM migration)
    3. User expectations, ergonomics

Versioning

  1. Support for both versioning models:
    1. version an object on-demand (manual versioning)
    2. version an object on-change (auto-versioning)
  2. Support for toggling auto-versioning on/off
  3. One-to-one correspondence between OCFL versions and mementos
  4. For archival-groups, any new version of the OCFL Object captures current state of the entire archival-group

Versioning on-demand

  1. Same as Fedora 4 and 5 version creation: POST to a resource's "/fcr:versions" endpoint to create a Momento (i.e. a new OCFL version directory)
  2. Actively edited objects not captured in a "cache/" directory at the sibling-level with OCFL version directories

Versioning on-change

  1. Every update to a Fedora resource results in a new OCFL version directory
  2. Potential downsides:
    1. Potential storage impact
    2. Potentially creates "noisy" version history
    3. Note: Transactions could mitigate "noisy" version history by grouping multiple updates in a single commit

Implementation notes

  1. Same code logic used for creation of OCFL versions / Mementos in both on-demand and on-change models

Migration from lower versions of Fedora to higher

  1. Design
    1. Release import/export tool for each version of Fedora (4, 5, 6)
      1. Import/Export tool for a given release is able to round-trip content for that release
    2. If necessary, transform exported serialization produced from one Fedora version to the a serialization that is expected for the import Fedora version
      1. May be able to transform F3? 4, 5 directly to F6-OCFL on-disk serialization

  2. Fedora resource URLs must remain unchanged during migrations
  3. Persistence model of Fedora 6 should be stable enough to eliminate the need for a content migration to Fedora 7

Fixity service

  1. Requirements:
    1. Check fixity of binary resource(s) by comparing computed value with stored value
    2. Check fixity of binary resource(s) given a specific set of Fedora object rdf:types
    3. Persist results of fixity check
      1. In log file?
      2. In database?
      3. In Fedora?
  2. Scheduled fixity service:
    1. Probably not part of the core
    2. Run as a separate service (see: Riprap)
    3. Schedule based on circular queue of Fedora resources, ordered by "last fixity check" date property on Fedora resource
  3. Retain "fedora:hasFixityService" triple or header
  4. At the OCFL-level, interest in providing fixity over an OCFL storage hierarchy

Query service

  1. Proposal: Query service / endpoint should support the following queries:
    1. List all resources
    2. List resources by mimetype
    3. List resources by parent
    4. List resources by mimetype, parent, and modified date (<>=)
    5. List resources where modified  <> x date
  2. Open questions around scope of resources to be searchable
    1. Fedora resources?
    2. Resources defined in RDF documents within the repository?
    3. Hash URIs?
  3. Open questions around properties to support
    1. Server-managed triples?
    2. All properties?
  4. Triplestore not necessarily required

Implementation notes

  1. Index of all Fedora resources would be needed to support the query service
  2. Messaging model (synchronous or asynchronous) would likely be used to populate the index
  3. Full-text search would be a bonus

Transaction service

  • No definitive decisions made.
  • Proposal: no change to the Fedora API spec in 6.  We will either:
    • align code with the (as-yet-to-be-ratified) side-car specification
    • leave HTTP API unchanged while introducing the possibility of auto-versioning on transaction completion.

Raw notes

  1. General VA Beach Meeting notes
  2. Migration notes
  3. Object modeling notes
  4. Versioning notes
  5. Fixity notes
  6. Bulk ingest notes
  7. Query service notes
  • No labels