ActiveFedora - DuraSpace Wiki

gayheadtibburInternet και Εφαρμογές Web

5 Φεβ 2013 (πριν από 4 χρόνια και 8 μήνες)

620 εμφανίσεις

The Hydra Framework

as a Series of Diagrams

Naomi Dushay

Stanford University Libraries

April, 2012

1

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

Blacklight

Hydra

2

Ruby on Rails

Views: UI presentation

Controllers: UI flow of control

Models: interface to stored data

SQL database

Views

Models

Controllers

D
ata storage

Rails

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

3

Blacklight

Gem

Views: UI presentation

Controllers: UI flow of control

Models: interface to stored data

SQL database

Views

Models

Controllers

D
ata storage

Solr

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 gem

t
hat provides a
web discovery
interface for a
Solr

index

4

Your Data

Your
Blacklight

Application

Your SQL database

Views

Models

Controllers

Your
Solr

Blacklight

Your Rails Application

5

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

Blacklight

Hydra

6

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.

Models


HydraHead

Your Data
in Fedora

7


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

8

Your SQL database

Your Hydra Head/Application


part 1

Your Data

Views

Models

Controllers

Your
Solr

Blacklight

Your Rails Application

Your
Fedora


HydraHead

9

Models

ActiveFedora

Gem
-

part 1

Views: UI presentation

Controllers: UI flow of control

Model Logic Implementation

SQL database

Views

Controllers

Fedora

D
ata 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

10

Models

HydraHead

Gem


part 3

Views

Controllers

Fedora

ActiveFedora

HydraHead

HydraHead

utilizes the
ActiveFedora

gem to
interact with Fedora

11

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

12

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

13

Models

ActiveFedora

Gem


part 2

Views

Controllers

ActiveFedora

Solr

Fedora

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.

14

Models

HydraHead

Gem


part 4

Views

Controllers

ActiveFedora

Solr

Fedora

Solrizer
-
Fedora

Rubydora

Solrizer

HydraHead

requires
ActiveFedora

which in
turn requires
additional Hydra
framework gems


HydraHead

15

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
.

16

Models

OM and
ActiveFedora

(Simplified)

Solr

Views

Controllers

Fedora
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.

OM

ActiveFedora

XML

datastream

content

17

Models

ActiveFedora

Gem


part 2 (again)

Views

Controllers

ActiveFedora

Solr

Fedora

Solrizer
-
Fedora

Rubydora

Solrizer

No XML content, so
no use of
OM

gem

18

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

19

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.

20

Rubydora

Your SQL database

Models

Your
Solr

Views

Controllers

Solrizer

Solrizer
-
Fedora

ActiveFedora

Your Hydra Head/Application


part 2

Your Data

Your
Fedora

Blacklight

HydraHead

Your Rails Application

21


(
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

22


Hydra
-
Jetty


JettyWrapper

Additional Hydra
-
Framework Code

maintained by the Hydra Community

23

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:
J
ava Web Server and Servlet Container



(note that
Solr

and Fedora are both written in java and utilize java servlets)

J
ettyWrapper

24

One Possible Backend Configuration

H
ydra
-
Jetty

Solr

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

25

Solrizer

Solrizer
-
Fedora

Rubydora

Your SQL database

H
ydra
-
Jetty

Your
Solr

ActiveFedora

Your Hydra Head/Application

using Hydra
-
Jetty

Your Data

Your
Fedora

Models

Views

Controllers

Blacklight

HydraHead

Your Rails Application

26