Stick with it?!?
ActiveFedora and Fedora 6
Chris Colvard, Indiana University
Samvera Connect 2023
Samvera means “togetherness”
Geekscruff has a posse
I have a posse
You have a posse
Growing open technologies, together
Avalon Media System
Avalon is a Samvera solution bundle for audio and video access.
Avalon 1.0 was in 2012 using Fedora 3.6 with ActiveFedora 3.3.0
How does Avalon use Fedora?
Performance Issues
Fedora/ActiveFedora performance is passable in many Avalon use cases, except:
Migration to Fedora 4
ActiveFedora made a hard cut over to Fedora 4 in 2015 (v9.0)
Avalon migrated to Fedora 4 in 2017 (v6.0)
Avalon created custom migration tools including dashboard
Took a fair amount of coding effort.
Running the migration was slow.
There was a long tail to clean up problem items.
Why migrate to Fedora 6?
Fedora 4 - unsupported, modeshape
Fedora 6 - supported, OCFL
Will Fedora 6 provide any relief for our performance issues?
Which path to Fedora 6 to take?
Hyrax
Valkyrie
ActiveFedora
Mike W Hallett / Ashwell Road fork / CC BY-SA 2.0
Possible Pathway - Hyrax
Hyrax 5 comes with Valkyrie
Avalon did say we’d do this at SC2017 but had to divert attention
Would still be a really large effort: 1+ devoted years
Data migration
Reassessing long-term roadmap of Avalon so not ready to commit
Possible Pathway - Valkyrie
Valkyrie would provide Fedora 6 and more options
Would be large effort? Maybe we could use Wings?
Data migration
Possible issues: MODS xml files with OM? Callbacks?
Possible Pathway - ActiveFedora
☑️ About to be deprecated
☑️ Performance issues
BUT…it’s what we’re using right now.
Maybe it could be a temporary solution until we figure out our long-range plan?
Let’s experiment: ActiveFedora
Prior work by others in branch for Fedora 5 support
Experiments 2 years ago looked promising with most tests passing
Let’s experiment some more and see if it’d work without investing too much time.
Can we avoid slow app-specific data migration and tooling?
Will our pain points be any better?
Steps
Changes to ActiveFedora
https://github.com/samvera/active_fedora/compare/main...fedora6-cjcolvar-rebase
2019: moved types form direct/indirect container classes into headers (Trey Pendragon)
2020: changed handling of external files (Stuart Kenny)
version handling updated, dropped ability to restore versions (Stuart Kenny)
2021, 2023: Fix tests, upgrade faraday to 2.0, test with fcrepo 6.4 (Chris Colvard)
Changes to other gems
active_fedora-datastreams: https://github.com/samvera-labs/active_fedora-datastreams/compare/main...fedora6_rebase
Use the ActiveFedora branch
Pin rdf-rdfa
Test with fcrepo 6.4
Changes to Avalon
https://github.com/avalonmediasystem/avalon/pull/5363
Test migration
Setup test instance with data from https://archivomesoamericano.org
5 collections, ~550 works, ~400 files, ~1100 derivatives
~4300 ActiveFedora::Base objects total
Migration process: https://wiki.lyrasis.org/display/FEDORA6x/Migrate+to+Fedora+6#MigratetoFedora6-TheFedora4%E2%86%926MigrationPath
Start up Fedora 6 on migrated OCFL filesystem and it just works!
Changes to migration tooling
Skip special handling of ACL and ebucore:filename predicates so they flow through since Avalon and Hydra-Head are using them differently than Fedora expects.
Diff: https://gist.github.com/cjcolvar/39f1290323373499bb86de0981ba6f27
Neat! It seems to work?
�But what about our performance pain points?
Real World Performance Testing
Batch ingest a 100 section item into Avalon:
Fedora 4 - 32 minutes 13 seconds
Fedora 6 - 44 minutes 6 seconds
Add another section to that item:
Fedora 4 - 85 seconds
Fedora 6 - 504 Gateway timeout - 35 minutes 55 seconds (left object broken?)
Publish the item (simple save):
Fedora 4 - 12 seconds
Fedora 6 - 6 seconds
Performance Testing: many works in a collection
Benchmark.benchmark { |x|100.times { x.report { MediaObject.create!(collection: c) } } }
Performance Testing: many files in a work
Benchmark.benchmark { |x|100.times { x.report { MasterFile.create(workflow_name: 'avalon', media_object: mo) } } }
Avoid the ordered_aggregation!
So what exactly is ordered_aggregation?
Order through a linked list of proxy nodes using ore:aggregation
How to store order differently?
Serialized JSON array of ids
Like how Valkyrie does it
Would require a data migration but might be fairly narrow and simple?
Could this be the performance problem for pre-Valkyrized Hyrax as well?
Changes to models for testing: https://gist.github.com/cjcolvar/785f723942707653bfaa442a77305317
Changes in testing script including explicitly saving twice:
mf = MasterFile.create!(workflow_name: 'avalon')
mf.media_object = mo
mf.save
Conclusions and Future Explorations
Questions or comments…reach out!