Krikri/Heidrun Architecture diagram (PDF)

High-Level Components

Heidrun is a Ruby on Rails application, and most of its functionality is implemented through Krikri, a Rails engine.

Data Models

Metadata models used by Krikri are implemented using ActiveTriples, an ActiveModel-like interface for Resource Description Framework graphs built on top of RDF.rb. DPLA has produced the dpla_map gem, which implements ActiveTriples models for the DPLA Metadata Application Profile. A small number of Krikri models are implemented using ActiveRecord.

Metadata Harvesting, Mapping, and Enrichment

Krikri implements a number of harvesters used to bring metadata into Heidrun. Metadata mapping is implemented using a mapper, which uses the mapping domain specific language to instantiate DPLA MAP graphs. Harvesters, mappers, and enrichments can have jobs associated with them, managed by Resque, which runs on top of the Redis key-value store.

Persistence and indexing

Graphs generated by the application are persisted in Apache Marmotta, a triple store that implements the Linked Data Platform 1.0 Recommendation. In our deployment, Marmotta stores its backend data in PostgreSQL, along with objects associated with ActiveRecord-based models. Krikri interacts with Marmotta through rdf-marmotta, an RDF::Repository implementation for RDF.rb.

Indexing for QA views is provided by Apache Solr.

Marmotta and Solr are bundled for development in marmotta-jetty, which is loaded through Jettywrapper.


QA views are provided in part using Blacklight, a Rails engine that provides a discovery interface for Solr indexes.