Top Banner
The Hydra Framework as a Series of Diagrams aomi Dushay tanford University Libraries pril, 2012 1
26

The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

Mar 28, 2015

Download

Documents

Dillon Askren
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

1

The Hydra Framework as a Series of Diagrams

Naomi DushayStanford University LibrariesApril, 2012

Page 2: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 3: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 4: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 5: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

5

Your Data

Your Blacklight Application

Your SQL database

Views

Models

Controllers

Your Solr

Blacklight

Your Rails Application

Page 6: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 7: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 8: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 9: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

9

Your SQL database

Your Hydra Head/Application – part 1

Your Data

Views

Models

Controllers

Your Solr

Blacklight

Your Rails Application

Your Fedora

HydraHead

Page 10: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 11: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

11

Models

HydraHead Gem – part 3

Views

Controllers

Fedora

ActiveFedora

HydraHead

HydraHead utilizes the ActiveFedora gem to interact with Fedora

Page 12: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 13: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 14: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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.

Page 15: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 16: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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.

Page 17: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 18: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

18

Models

ActiveFedora Gem – part 2 (again)

Views

Controllers

ActiveFedora

SolrFedora

Solrizer-Fedora

Rubydora

Solrizer

No XML content, so no use of OM gem

Page 19: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 20: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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.

Page 21: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 22: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 23: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

23

• Hydra-Jetty• JettyWrapper

Additional Hydra-Framework Code maintained by the Hydra Community

Page 24: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 25: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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

Page 26: The Hydra Framework as a Series of Diagrams Naomi Dushay Stanford University Libraries April, 2012 1.

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