Table of Contents |
---|
Design Principles
- Driving principles:Minimizing Minimize change to the user via the API
- Retain URLs of migrated Fedora resources
- Compliance with OCFL
- Do not allow OCFL-isms not from bleeding into Fedora API
- Rebuildability
- Compliance with OCFL
- Retain URLs of migrated Fedora resources
- Performance
- Reducing complexity of implementation
Fixity service
Transaction service
Query endpoint
Versioning
- Support for both:
- version an object on-demand (manual versioning)
- version an object on-change (auto-versioning)
- Support for toggling auto-versioning on/off
- Note: Actively edited objects not captured in an OCFL version directory
Bulk ingest
To flavors of pointing a Fedora instance at an OCFL backend.
- via OCFL
- via Fedora OCFL
- Performance
- Reduce complexity of implementation
Issues being addressed
Based on feedback from users of Fedora 4 and 5, the design for the next major release of Fedora will address the following issues:
Preservation persistence
The notions of "completeness" and "transparency" are important when it comes to how a preservation repository persists its resources (metadata and binaries) to storage. The resources in storage should be "complete" in the sense that Fedora should be able to rebuild its indexes based on what is stored on disk as files. The documented transparency of those persisted files also allows for other applications to consume those resources. See section below: OCFL Persistence.
Query service
The ability to query Fedora for basic information regarding the contents of the repository has been a missing feature in Fedora 4 and 5. This design will include a simple query service for inspecting all of the Fedora resources or resources based on specific attributes. See section below: Query service.
OCFL persistence
Architecture
- Retaining HTTP layer of existing Fedora codebase
- Replacing ModeShape persistence with OCFL storage
- Support for three interaction models:
- atomistic (implicit) - every LDP resource maps to an individual OCFL Object
- archive group - hierarchy of LDP resources map into a compound OCFL Object
- archival-part (implicit) - an LDP resource that is a constituent part of a compound OCFL Object
- Eliminate "single-subject-restriction", i.e. support arbitrary RDF
- Fedora-specific information to be stored in the OCFL Object in a ".fcrepo/" directory
- i.e. Which file is the description of another file
- i.e. Which file is an ACL
- Optimizing reads/lookups with an internal database
- proposed database model: https://docs.google.com/document/d/
...
...
...
...
- Support for both OCFL storage hierarchies:
- created by Fedora
- created by another application (pre-existing)
Import / Export (Migration)
https://docs.google.com/document/d/1nvUDar1DbexdU3oTRGxzcZGG3qxsD2HWQbGyyRJIgDE/edit#
Mapping between LDP and OCFL
Opt-in model
Fedora resources may be created with an optional "archive group" interaction model provided via headers.
New resources created via POST or PUT to the archive group will be LDP contained by the archive group and will be stored within the OCFL object representing that archive.
If a resource is created without the "archive" model, new resources created via POST or PUT will be LDP contained by the archiveparent resource, but will be stored as separate OCFL objects.
Notes/Implications
- Note: user establishes interaction model at creation timeAt creation time, you establish what you want and then stay in that model. Changing the model would require additional migration tooling.
- Requires 3 interaction approaches: atom (implicit), archive, part (implicit)
Architecture
- Retaining HTTP layer of existing Fedora codebase
- Replacing ModeShape persistence with OCFL storage
- Optimizing reads/lookups with an internal database
- proposed database model: https://docs.google.com/document/d/1MsMfhae3thmNdoFtnTUnII3mr_-OkllRs9PvgnY1fDY/edit
Scaling
- stateless Fedora instances
- database can be clustered and scaled
- file system -> cloud object store
Performance
Bulk ingest
- Faster ingest rates can be achieved by users writing OCFL-compliant content directly to disk
- Would require Fedora to (re)scan OCFL storage hierarchy
- Optionally, user could write into OCFL-compliant storage in a way that includes Fedora optimizations (e.g. ".fcrepo/" directory)
Open questions
- Role of OCFL storage roots
- Could be valuable for multi-tenancy, but client interaction model has not been detailed
- What is the mapping / algorithm / relationship between:
- Fedora URL of LDP resource
- OCFL Object.ID
- OCFL storage path for associated OCFL Object
Implementation notes
- Provide new implementation of fcrepo-kernel-api that interacts with OCFL persistence
- Interactions with OCFL persistence should initially take advantage of the JHU OCFL client
- For pre-existing OCFL storage hierarchies, Fedora-imposes the following constraint:
- The OCFL storage hierarchy must have a single, consistent "ocfl_layout" (i.e. the storage path mapping algorithm must be determinant)
- 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)
Deleting tombstone of OCFL Object purges the Object
Deleting tombstone of "constituent part" is not supported (405)
. No loading of modeshape nodes required.- Ingest speeds:
ModeShape replacement
OCFL persistence
- Support for both OCFL objects:
- created by Fedora
- pre-existing, created by another application
Fedora-specific details
Prototyping proposal
- Expose JHU OCFL client functionality with minimal HTTP endpoints
- Such an endpoint should implement minimal LDP interactions
- Use HTTP over OCFL to test:
- Performance bottlenecks
- Scale viability (e.g. NLM migration)
- User expectations, ergonomics
Versioning
- Support for two versioning models:
- version an object on-demand (manual versioning)
- version an object on-change (auto-versioning)
- Support for toggling auto-versioning on/off
- One-to-one correspondence between OCFL versions and mementos
- For archive groups, any new version of the OCFL Object captures current state of the entire archive group
Versioning on-demand
- Same as Fedora 4 and 5 version creation: POST to a resource's "/fcr:versions" endpoint to create a Memento (i.e. a new OCFL version directory)
- Actively edited objects captured in a "cache/" directory at the sibling-level with OCFL version directories
Versioning on-change
- Every update to a Fedora resource results in a new OCFL version directory
- Potential downsides:
- Potential storage impact
- Potentially creates "noisy" version history
- Note: Transactions could mitigate "noisy" version history by grouping multiple updates in a single commit
Implementation notes
- Same code logic used for creation of OCFL versions / Mementos in both on-demand and on-change models
- LDP resources within a compound object should respond with a "Link" header pointing the the TimeMap of the Fedora "archive group" resource
POST on /fcr:versions of part resources returns a 400 response
GET on /fcr:versions returns a version of the "constituent part"
Migration from lower versions of Fedora to higher
- Design
- Release import/export tool for each version of Fedora (4, 5, 6)
- Import/Export tool for a given release is able to round-trip content for that release
- If necessary, transform exported serialization produced from one Fedora version to the a serialization that is expected for the import Fedora version
May be able to transform F3? 4, 5 directly to F6-OCFL on-disk serialization
- Release import/export tool for each version of Fedora (4, 5, 6)
- Fedora resource URLs must remain unchanged during migrations
- Persistence model of Fedora 6 should be stable enough to eliminate the need for a content migration to Fedora 7
Fixity service
- Requirements:
- Check fixity of binary resource(s) by comparing computed value with stored value
- Check fixity of binary resource(s) given a specific set of Fedora object rdf:types
- Persist results of fixity check
- In log file?
- In database?
- In Fedora?
- Scheduled fixity service:
- Probably not part of the core
- Run as a separate service (see: Riprap)
- Potentially implemented as a circular queue of Fedora resources, ordered by "last fixity check" date property on Fedora resource
- Retain "fedora:hasFixityService" triple or header
- At the OCFL-level, interest in providing fixity over an OCFL storage hierarchy
Query service
- Should also consider this "Query Service Specification"
- Proposal: Query service / endpoint should support the following queries:
- List all resources
- List resources by mimetype
- List resources by parent
- List resources by mimetype, parent, and modified date (<>=)
- List resources where modified <> x date
- Open questions around scope of resources to be searchable
- Fedora resources?
- Resources defined in RDF documents within the repository?
- Hash URIs?
- Open questions around properties to support
- Server-managed triples?
- All properties?
- Triplestore not necessarily required
Implementation notes
- Index of all Fedora resources would be needed to support the query service
- Messaging model (synchronous or asynchronous) would likely be used to populate the index
- Full-text search would be a bonus
Transaction service
- 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
- Potentially store updates within a transaction in a "txn/" directory at the sibling-level with OCFL version directories
- Support actions on multiple OCFL objects within a single transaction
Raw notes
- General VA Beach Meeting notes
- Design summary notes
- Migration notes
- Object modeling notes
- Versioning notes
- Fixity notes
- Bulk ingest notes
- Query service notes
- /content/.fcrepo directory
- Hashing (SHA256) on LDP path of resource