Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

137 lines (85 sloc) 6.32 kb

Hydra — Overview

The Pieces

The Hydra framework was carefully designed as a collection of components that work in concert to present the behaviors of a single application.

There are three main components at the application level — the Hydra plugin, Blacklight, and Solrizer. The Hydra plugin is a Rails plugin that provides the Create, Edit and Delete behaviors of your Hydra-powered applications. When you combine that with Blacklight (also a Rails plugin), which provides Search & Display behaviors, you get a complete application. Solrizer provides the crossover between these two by ensuring that the Solr index is immediately updated to reflect any Create/Edit/Delete actions that you have performed.

Underneath these components, we rely on Fedora and Solr.

Hydra Plugin

Customizable Framework for building repository-driven applications
Flexible access controls


  • integration of ActiveFedora & Solrizer


  • helper methods for displaying editable metadata
  • javascript code that works with the views & controllers
  • basic views for displaying multi-file uploader & listing/downloading file assets

Access Controls Enforcement

Uses Hydra rightsMetadata schema, which is indexed into Solr in order to allow for enforcement on all Read, Write, Edit and Search/Discover actions.

  • re-usable API hooks for using and/or extending enforcement logic
  • REST API methods for adding/editing permissions
  • automatically indexes rights metadata into Solr
  • supports gated discovery out of the box


Next-Gen Content-Aware Search & Discovery


Customizable indexing


Flexible preservation-oriented storage service


Robust, flexible faceted search


Jetty is a lightweight Java Application Container. We have created a copy of Jetty with Fedora and Solr pre-installed and configured to work with Hydra applications. You can use this to get your development, testing and demo environments set up with minimal hassle. By convention, we put it into a directory called “jetty” at the root of a Hydra application. See Hydrangea for sample usage.

Note: Hydra-Jetty is not meant for use for production deployment. In production environments, you should set up an application container like Tomcat and point the “production” section of config/fedora.yml and config/solr.yml to point to that production system’s URL.

Hydra Heads

Hydra Heads are independently built & distributed Hydra-powered applications that suit specific users and specific content types. If you are looking for an out-of-the box solution, these are what you want.

Examples of Hydra Heads

A number of Hydra heads are in the works. Some of them already exist in pre-Hydra form and will be updated to use the Hydra framework once Hydra 1.0 is released. Some Hydra Heads include:

  • Articles & Publications Tracker (Institutional Repository)
  • Scientific Dataset Curation
  • ETD (Electronic Theses & Dissertations) Submission
  • Scanned Manuscripts
  • Everyday (Born Digital) Archival Materials

These are just a few examples. Please feel free to create your own, and contact the Hydra community to see if anyone else shares your interests. Someone may already be working on a similar application.

Sharing/Re-using Hydra Content Types

In order to enable content-specific behaviors and displays, you must define a new content type, which consists of:

  • Hydra models
    • datastreams & metadata mappings
    • model-specific behaviors
  • Model-specific views (Search Result, Show/Details, Edit)

It’s very easy to share Hydra content types across multiple Hydra Heads by putting the Hydra models and views into a Rails plugin.


Reference implementation
Slick editor UI features
MODS support

Hydrangea is the reference example for creating Hydra Heads. It contains an implementation of the complete Hydra stack, which consists of Blacklight + Hydra Framework + Hydra Models & Model-specific Views all sitting on top of Fedora and Solr. In addition to serving as a starting point for those looking to use the Hydra framework, Hydrangea will also serve as a reference example as we discover and settle upon new best practices for building Hydra-powered applications.

  • Full Hydra framework installed & tested
  • Reference examples of Hydra models & views (Articles & Datasets) with MODS metadata
  • Example views for editing object-level permissions
  • Sample URL routing
  • Placeholder user & group management
    • works for demo & testing, but should be replaced with your institution’s user/group management solution (ie. LDAP) in real deployment
  • Sample Metadata Mappings (using OM)
    • MODS Articles
    • Hydra Rights Metadata

The Code


All of the code that we’ve written as part of Hydra, as well as some of the external code that it relies on, is all hosted in public Github repositories. Some portions of Hydra are distributed as Rails plugins that you can install into your rails applications. Other portions of Hydra are distributed as Ruby gems, which can be incorporated into any Ruby application.

Tested … Thoroughly

We use the following technologies to test our code. Our continuous integration server (we use Hudson) runs all of the automated tests against any code changes.

RSpec — unit testing of code
Cucumber — story-driven integration/acceptance tests
Celerity (coming soon) — automated javascript testing
Manual User Testing (provided by Stanford University Libraries)


Application — Rails Plugins/Engines

Hydra Repository plugin *
Fluid Infusion plugin

Underneath the Hood — Ruby Gems

Solrizer *
OM (Opinionated Metadata) *


Hydra javascripts (soon to be a JQuery plugin) *
Fluid Infusion JQuery plugin

\* indicates code that was written in the process of creating Hydra

Jump to Line
Something went wrong with that request. Please try again.