1 the web-interfacing repository manager a perl-based application server rex jakobovits, phd...

53
1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD [email protected] WIRM.org July 20, 2000

Upload: rosaline-warner

Post on 12-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

1

The Web-Interfacing Repository Manager

A Perl-Based Application Server

Rex Jakobovits, PhD

[email protected]

WIRM.org

July 20, 2000

Page 2: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

2

Application Server: A class of Middleware

Page 3: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

3

Roles of a Repository Manager

Page 4: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

4

Outline of Talk

1. Requirements Analysis2. Architecture3. Model & Methodology4. Evaluation

Page 5: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

5

Requirements Analysis1) Systems Integration

“Wrapper” around heterogeneous applications

insulate user from idiosyncrasies of interfaces

Hide details of control flow Automatically launch programs Transparently handle format

translations

Page 6: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

6

Requirements Analysis2) Data Integration

Uniform interface for querying & browsing application data

Two basic strategies: Data warehousing Query mediation

Page 7: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

7

Requirements Analysis:3) Workflow Support

Monitor data acquisition Manage stages of processing Tools for defining and evolving workflow

Page 8: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

8

Page 9: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

9

Requirements Analysis:4) Collaboration Support

Share data across facilities Access programs remotely Publish files on web Groupware features

annotations, etc.

Page 10: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

10

Page 11: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

11

Page 12: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

12

Requirements Analysis:5) Advanced Data Types

Allow arbitrary user-defined types Built-in Multimedia Support

Metadata management Image conversions Visualization

Evolving domain model

Page 13: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

13

Page 14: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

14

Requirements Analysis:6) Effective Navigation System Consistent, predictable interface Hierarchical data traversal

e.g. List of patients single patient MR exam series slice

Page 15: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

15

Requirements Analysis:7) Dynamic Schema Evolution

Page 16: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

16

Requirements Analysis:8) User Session Support

Page 17: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

17

Requirements Analysis:9) Adaptive User Interface Customizable for distinct user

classes Selective labels Reorganize data according to

anticipated interest Access regulation

Privacy (e.g. public, collaborator, privileged)

Proprietary data (published vs. unpublished)

Page 18: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

18

Page 19: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

19

WIRM Architecture

ClassDefs

WIRMServer

WirmletClient

Browser

DBServer

RDBRDB File DataFile Data Viz Cache

Viz Cache

WebServer

Web View

Page 20: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

20

WIRM Server Components

HTML Generator

FSA Controller

Gateway

Repository Object Interface

Table Manipulator

DBI

VCM

Image Magick CGI.pm

ClassDefs

ClassDefs

WirmletWirmlet

RDBRDB File DataFile Data Viz CacheViz Cache

WIRM Server

WebView

WebView

Page 21: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

21

The Query-By-Context Design Methodology An approach to developing information

systems using hierarchical, context-sensitive views over domain data, based on…

The Repository Object Model Abstraction for modeling the structure and

behavior of experiment objects

The Wirmlet Process Model Abstraction for modeling the events that control

a user’s interaction with experiment objects

Page 22: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

22

Repository Object Model Allows EMS designer to model domain

knowledge as Object-Relational Classes

Each Class Definition consists of: Schemas

(modeling structural properties of objects) Methods

(modeling behavior of the objects)

Page 23: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

23

Repository Object Model:Schema Definition Each Schema is designed using

graphical Schema Definition Tool

A Schema consists of a list of Attribute Definitions (Name-Type pairs)

Attribute Types can be: Atomic (string, int, real, date) Composite (reference to a class instance) Aggregate (list or set)

Page 24: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

24

ROM Schemas continued… Built-in (domain-independent)

composite types: File User Annotation

Every Schema must include Object ID to uniquely identify instances

Page 25: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

25

Repository Object Model:Object Instances Domain data is organized as instances of

values matching a schema structure

Implemented as rows in a Relational table

Programmer can access attributes by name using object-oriented abstraction, as opposed to ordered tuples(e.g. $patientage instead of $p[4][2])

Page 26: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

26

ROM Data Abstraction

REPO API

File System RDBMS

Page 27: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

27

Repository Object Model:Defining Methods Each method is a procedure encoding

some behavior of the class, invoked through any instance of the class.

Methods are written in the ROM Procedure Language, which provides access to:

Repository State (SQL queries + persistent instance variables)

Context State (user identity, etc.) User I/O (GUI elements)

Page 28: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

28

ROM Procedure Language

GATEWAY API

show(Patients, “sex = M”);

Page 29: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

29

Methods of the Repository Object Superclass All Repository classes inherit a set of

methods from a prototype superclass

Can be specialized (overridden) by EMS designer

Inherited methods are: Make, Update, Delete, View-Label, View-Row, View-Row-Header,

View-Page

Page 30: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

30

Page 31: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

31Default Make method for Book

Page 32: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

32

View Methods: Drill-Down Visualization View-Label

Visualize in context of string Self-hyperlink that leads to Page View Default: “classname OID”

View-Row Visualize in context of group (table) List of attributes (possibly subset) First item should be Label View Default: Label view + every attribute

Page 33: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

33

Drill-Down VisualizationContinued… View-Page

Visualize in context of full page Object becomes current “focus

subject” Should use Label View in title Default: List every attribute

(same as Row View)

Page 34: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

34

Writing Custom Views EMS Designer overrides default views

by writing specially-named methods using ROM Procedure Language Make View-Label more descriptive than

“classname OID” (e.g. patient name) Make View-Row a summary (omit some

details) Make Page-View more interesting

(presentation style, reorder information, etc.)

Page 35: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

35Default Row View for Book

Page 36: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

36

Custom Views for Book

sub Book_view_label { my($b) = @_; return href($b->{title}, vlink($b)); }

sub Book_view_row { my($b) = @_; return [ Book_view_label($b), “ $b->{author_first_name} $b->{author_last_name} ”, File_view_icon($b->{cover}) ]; }

Page 37: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

37

Page 38: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

38

Context-Sensitive Views Views have access to global context

variables Key to building context-sensitive web site

is to implement context-switching at view granularity E.g. Patient-Label-View:

if (USER == $PRIVILEDGED) {

show($patient{name}); } else { show($patient{number}); }

Page 39: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

39

The Wirmlet Process Model Abstraction for modeling the system as a set of

discrete event-handlers

Wirmlet: a script which encapsulates a simple web-based interaction with the user, emitting a Web View (HTML document)

Divide and conquer: break down problem of designing information system into small, coherent steps at the granularity of a form submission or hyperlink traversal

Page 40: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

40

Defining & Executing Wirmlets Each Wirmlet has a URL, a handle by

which it can be executed… Directly by naming the URL Through a hyperlink that encodes the URL By submitting a form tied to the URL

Wirmlets are written in the ROM Procedure Language, so they have access to repository state, session state, and user I/O.

Page 41: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

41

Basic structure of a Wirmlet

1. Display document header information (banner, title, navigation bar)

2. Possibly display a prompt which includes a submit button

3. Process results (query database, possibly update database)

4. Display confirmation

Page 42: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

42

Built-In Wirmlets Domain-independent Wirmlets for

executing common operations Use inherited methods of ROM superclass Facilities for:

User maintenance Querying & browsing Creating & editing instances (Workflow) Schema management (defining, evolving, etc.)

Page 43: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

43

Page 44: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

44

Distributing System Logic: Wirmlets or Methods? WIS Designer only needs to build a few

“entry point” Wirmlets The majority of the system logic can be

relegated to the Class Methods, making use of built-in Wirmlets All data visualization goes through

Object Viewer Wirmlet Workflow can be encapsulated in Make &

Edit methods, which are activated through Create Object and Edit Object Wirmlets

Page 45: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

45

Example: Encapsulating Workflow in Make Method Consider WIS that keeps track of

which lab books are checked out. Two classes: Book & Loan Borrowing a Book can be

implemented as the Make method of the Loan class

Page 46: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

46

Page 47: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

47

Customizing Loan-Make

sub Loan_make_prompt {  $display .= h3("Borrowing a Book"); $display .= em("Which Book are you borrowing?"); 

$avail_books = repo_query("Book", "availability = 'IN LAB'"); $display .= repo_choice($avail_books, "book_choice");

$display .= submit("Borrow This Book");  return $display;}

Page 48: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

48

Page 49: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

49

Evaluation of Benefits:Programmer’s Perspective Comprehensive, adaptive drill-down

navigation system “emerges” from simple modeling steps

Hierarchical workflow management easy to implement using stepwise refinement

Changes are instantly realized New data immediately accessible anywhere Two-step updates (save buffer, refresh

browser) New schemas are “ready to use” On-the-fly schema evolution

Page 50: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

50

Evaluation of Benefits:Programmer Perspective (continued)

Object manipulation much less bug-prone than relational manip.

Hi-level abstractions = rapid prototyping easy to test interface design proposals Easy to refine system as programmer’s

understanding of domain evolves Perl is POWER!

Regular expression parser is crucial Huge leverage from existing module archives

Page 51: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

51

Evaluation of Benefits:End-User Perspective Uniform Web GUI much easier to

use for non-unix gurus Centralized, automated file

management pays off Annotation feature highly used Multi-context is key

Page 52: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

52

Lines of code in WIRM API’s

Interface Lines

Table Manipulator 419

FSA Controller 251

Gateway 1270

HTML Generator 500

Repository Object API 854

Visualization Cache Manager 348

Page 53: 1 The Web-Interfacing Repository Manager A Perl-Based Application Server Rex Jakobovits, PhD rex@workhost.com WIRM.org July 20, 2000

53WIRM.org