the hydra framework as a series of diagrams naomi dushay stanford university libraries april, 2012 1

Post on 28-Mar-2015

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

The Hydra Framework as a Series of Diagrams

Naomi DushayStanford University LibrariesApril, 2012

2

High Level (Rough Conceptual)

Solr

Create, Update, Delete

(any) Solr Index

Fedora Object Storage

Solr Index of Stored Objects

UI Layer: Ruby on Rails

Back End

Blacklight for Stored Objects

Read

BlacklightHydra

3

Ruby on Rails

Views: UI presentation

Controllers: UI flow of control

Models: interface to stored data

SQL database

Views

Models

Controllers

Data storage

Rails is a Ruby gem that provides an MVC framework for writing web applications

4

Blacklight Gem

Views: UI presentation

Controllers: UI flow of control

Models: interface to stored data

SQL database

Views

Models

Controllers

Data storageSolr

Blacklight

Solr is external to Blacklight, but required (much as a SQL database is required for a Ruby-on-Rails application)

Blacklight is a Ruby-on-Rails gemthat provides a web discovery interface for a Solr index

5

Your Data

Your Blacklight Application

Your SQL database

Views

Models

Controllers

Your Solr

Blacklight

Your Rails Application

6

High Level (Rough Conceptual, again)

Solr

Create, Update, Delete

(any) Solr Index

Fedora Object Storage

Solr Index of Stored Objects

UI Layer: Ruby on Rails

Back End

Blacklight Leveraged for Stored Objects

Read

BlacklightHydra

7

HydraHead Gem – part 1

Views

Controllers

Solr Fedora

HydraHead is a Ruby-on-Rails gem that provides a web interface for creating, updating, and deleting Fedora objects.

ModelsHydraHead

Your Data in Fedora

8

SQL database

HydraHead Gem – part 2

Views

Controllers

Solr Fedora

HydraHead utilizes the Blacklight gem for the UI pieces related to discovery (i.e. read only)

Models

Blacklight

HydraHead

9

Your SQL database

Your Hydra Head/Application – part 1

Your Data

Views

Models

Controllers

Your Solr

Blacklight

Your Rails Application

Your Fedora

HydraHead

10

Models

ActiveFedora Gem - part 1

Views: UI presentation

Controllers: UI flow of control

Model Logic Implementation

SQL database

Views

Controllers

Fedora Data storage

ActiveFedora is akin to the ActiveRecord gem in a Rails application – it provides the implementation of the logic between the models and the data storage.

ActiveFedora

Models: which data, which behaviors

ActiveRecord

11

Models

HydraHead Gem – part 3

Views

Controllers

Fedora

ActiveFedora

HydraHead

HydraHead utilizes the ActiveFedora gem to interact with Fedora

12

Solrizer and Rubydora Gems

Solr Fedora

Ruby access to Rest API

External Application

Solrizer Rubydora

The Solrizer and Rubydora gems allow Ruby access to the Rest APIs for Solr and Fedora

Rest API Rest API

13

Solrizer-Fedora Gem

Solr Fedora

Ruby access to Rest API

External Application

Solrizer Rubydora

Solrizer-Fedora extends the Solrizer gem to work with Fedora objects.

Rest API Rest API

Solrizer-Fedora

14

Models

ActiveFedora Gem – part 2

Views

Controllers

ActiveFedora

SolrFedora

Solrizer-Fedora

Rubydora

Solrizer

ActiveFedora utilizes Rubydora to interact with Fedora and Solrizer-Fedora to keep Solr in sync with Fedora.

The Solrizer-Fedora gem extends Solrizer gem.

15

Models

HydraHead Gem – part 4

Views

Controllers

ActiveFedora

Solr Fedora

Solrizer-Fedora RubydoraSolrizer

HydraHead requires ActiveFedora which in turn requires additional Hydra framework gems

HydraHead

16

OM Gem

Solr

XML data XML

Ruby access to Rest API

OM

Solrizer

OM (Opinionated Metadata) eases translation between raw XML and ruby objects. OM also provides a way to map the resulting ruby object data into Solr.

17

Models

OM and ActiveFedora (Simplified)

Solr

Views

ControllersFedora datastreams can have XML content

OM can be used to parse XML datastream content and map the content to Solr. The OM mappings become part of the ActiveFedora data models.

OMActiveFedora

XML datastream

content

18

Models

ActiveFedora Gem – part 2 (again)

Views

Controllers

ActiveFedora

SolrFedora

Solrizer-Fedora

Rubydora

Solrizer

No XML content, so no use of OM gem

19

Hydra Backend Gems

Solr Fedora

Views

Controllers

XML datastream

content

OM

Solrizer

Solrizer-Fedora

ActiveFedora

Rubydora

Updates to Fedora content must be reflected in both Solr and Fedora

Models

20

SQL database

Models

HydraHead Gem – part 5

Solr

Fedora

Views

Controllers

Solrizer

Solrizer-Fedora

ActiveFedora

Rubydora

Blacklight

HydraHead

HydraHead is a Ruby-on-Rails gem that utilizes the Blacklight gem to read and display Solr documents, the ActiveFedora gem to express Fedora objects in Ruby, the Solrizer-Fedora gem for ease of syncing Fedora and Solr, and other gems and their dependencies as needed.

21

Rubydora

Your SQL database

Models

Your Solr

Views

Controllers

SolrizerSolrizer-Fedora

ActiveFedora

Your Hydra Head/Application – part 2

Your Data

Your Fedora

Blacklight

HydraHead

Your Rails Application

22

• (Rubydora)• Solrizer• Solrizer-Fedora• OM• ActiveFedora• HydraHead• (Used, by not maintained by Hydra

Community: Blacklight, Solr, Fedora, …)

Core Hydra-Framework Code maintained by the Hydra Community

23

• Hydra-Jetty• JettyWrapper

Additional Hydra-Framework Code maintained by the Hydra Community

24

Jetty – Java Web Server and Servlet Container

Hydra-Jetty Jetty with Solr and Fedora pre-installed

Ruby – start/stop jetty, etc. (convenient for automated testing)

Jetty: Java Web Server and Servlet Container (note that Solr and Fedora are both written in java and utilize java servlets)

JettyWrapper

25

One Possible Backend Configuration

Hydra-JettySolr Fedora

Rest API Rest API

Solr and Fedora can be in the same web application or separate web applications. Solr is also implemented in Ruby and other languages, so it doesn’t need to be in a

26

SolrizerSolrizer-Fedora Rubydora

Your SQL database

Hydra-JettyYour Solr

ActiveFedora

Your Hydra Head/Application using Hydra-Jetty

Your Data

Your Fedora

Models

Views

Controllers

Blacklight

HydraHead

Your Rails Application

top related