67
Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern California Apache Software Foundation

Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Embed Size (px)

Citation preview

Page 1: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Exploiting Reference Architecture to

Guide the NASA Earth Science

System EnterpriseChris A. Mattmann

NASA Jet Propulsion LaboratoryUniversity of Southern California

Apache Software Foundation

Page 2: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

2

Objectives

Concepts What is domain-specific software engineering

(DSSE) The “Three Lampposts” of DSSE: Domain,

Business, and Technology Domain Specific Software Architectures

Product Lines Relationship between DSSAs, Product Lines, and

Architectural Styles Examples of DSSE at work

Page 3: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

3

Objectives

Concepts What is domain-specific software engineering

(DSSE) The Three Key Factors of DSSE: Domain,

Business, and Technology Domain Specific Software Architectures

Product Lines Relationship between DSSAs, Product Lines, and

Architectural Styles Examples of DSSE at work

Page 4: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

4

Domain-Specific Software Engineering The traditional view of software engineering shows

us how to come up with solutions for problems de novo

But starting from scratch every time is infeasible This will involve re-inventing many wheels

Once we have built a number of systems that do similar things, we gain critical knowledge that lets us exploit common solutions to common problems In theory, we can simply build “the difference”

between our new target system and systems that have come before

Page 5: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

5

Examples of Domains Compilers for programming languages Consumer electronics Electronic commerce system/Web stores Video game Business applications

Basic/Standard/“Pro”

We can subdivide, too: Avionics systems

Boeing Jets Boeing 747-400

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 6: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

6

Traditional Software Engineering

One particular problem can be solved in innumerable ways

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 7: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

7

Architecture-Based Software Engineering

Given a single problem, we select from a handful of potential architectural styles or architectures, and go from these into specific implementations

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 8: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

8

Domain-Specific Software Engineering

We map regions of the problem space (domains) into domain-specific software architectures (DSSAs)

These are specialized into application-specific architectures These are implemented

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 9: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

9

Three Key Factors of DSSE Domain

Must have a domain to constrain the problem space and focus development

Technology Must have a variety of technological solutions—tools,

patterns, architectures & styles, legacy systems—to bring to bear on a domain

Business Business goals motivate the use of DSSE

Minimizing costs: reuse assets when possibleMaximize market: develop many related

applications for different kinds of end users

Page 10: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

10

Domain Business

Technology

Three Key Factors

Domain Must have a domain

to constrain the problem space and focus development

Page 11: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

11

Domain Business

Technology

Three Key Factors Technology

Must have a variety of technological solutions—tools, patterns, architectures & styles, legacy systems—to bring to bear on a domain

Page 12: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

12

Domain Business

Technology

Three Key Factors Business

Business goals motivate the use of DSSE

Minimizing costs: reuse assetswhen possible

Maximize market: develop many related applications for different kinds of end users

Page 13: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

13

Domain Business

Technology

Three Key Factors Domain + Business “Corporate Core

Competencies” Domain expertise

augmented bybusinessacumen andknowledge ofthe market

Page 14: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

14

Domain Business

Technology

Three Key Factors Domain + Technology “Application Family

Architectures” All possible

technologicalsolutions toproblems in adomain

Uninformed and unconstrained bybusiness goalsand knowledge

Page 15: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

15

Domain Business

Technology

Three Key Factors Business + Technology “Domain independent

infrastructure” Tools and

techniques forconstructingsystems independent of anyparticular domain

E.g., most generic ADLs, UML, compilers, word processors, general-purpose PCs

Page 16: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

16

Domain Business

Technology

Three Key Factors Domain + Business +

Technology “Domain-specific

software engineering” Applies technology

to domain-specificgoals, tempered bybusiness and marketknowledge

Page 17: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

17

Domain Business

Technology

Three Key Factors Product-Line

Architectures A specific, related set

of solutions withina broader DSSE

More focus oncommonalities andvariability betweenindividual solutions

Page 18: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

18

Becoming More Concrete

Applying DSSE means developing a set of artifacts more specific than an ordinary software architecture Focus on aspects of the domain Focus on domain-specific solutions, techniques,

and patterns These are

A domain model and A domain-specific software architecture (DSSA)

Page 19: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

19

Domain Model

A domain model is a set of artifacts that capture information about a domain Functions performed Objects (also known as entities) that perform the

functions, and on which the functions are performed

Data and information that flows through the system Standardizes terminology and semantics Provides the basis for standardizing (or at least

normalizing) descriptions of problems to be solved in the domain

Page 20: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

20

Domain Model

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 21: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

21

Domain Model

Defines vocabulary for the domain

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 22: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

22

Domain Model

Describes the entities and data in the domainSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 23: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

23

Domain Model

Defines how entities and data combine to provide features Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 24: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

24

Domain Model

Defines how data and control flow through entitiesSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 25: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

25

Info Model: Context Info Diagram Defines high-

level entities Defines what

is considered inside and outside the domain (or subdomains)

Defines relationships and high-level flows

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 26: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

26

Info Model: Entity-Relationship Diagram

Defines entities and cardinal relationships between them

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 27: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

27

Info Model: Object Diagram

Defines attributes and operations on entities

Closely resembles class diagram in UML but may be more abstract

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 28: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

28

Feature Model: Use Case Diagram

Defines use caseswithin the domain

Similar to use casemodels in UML

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 29: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

29

Operational Model: State Transition Diagram

Focuses on statesof systems andtransitions betweenthem

Resembles UMLstate diagrams

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 30: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

30

Reference Requirements Mandatory

Must display the current status of the Lunar Lander (horizontal and vertical velocities, altitude, remaining fuel)

Must indicate points earned by player based on quality of landing

Optional May display time elapsed

Variant May have different levels of difficulty based on pilot

experience (novice, expert, etc) May have different types of input depending on whether

Auto Navigation is enabled Auto Throttle is enabled

May have to land on different celestial bodies Moon Mars Jupiter’s moons Asteroid

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 31: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

31

Domain-Specific Software Architecture Definition: Definition. A domain-specific

software architecture (DSSA) comprises: a reference architecture, which describes a

general computational framework for a significant domain of applications;

a component library, which contains reusable chunks of domain expertise; and

an application configuration method for selecting and configuring components within the architecture to meet particular application requirements. (Hayes-Roth)

Page 32: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

32

Reference Architecture

Definition. Reference architecture is the set of principal design decisions that are simultaneously applicable to multiple related systems, typically within an application domain, with explicitly defined points of variation.

Reference architectures are still architectures (since they are also sets of principal design decisions) Distinguished by the presence of explicit points

of variation (explicitly “unmade” decisions)

Page 33: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

33

Different Kinds of Reference Architecture

Complete single product architecture A fully worked out exemplar of a system in a

domain, with optional documentation as to how to diversify

Can be relatively weak due to lack of explicit guidance and possibility that example is a ‘toy’

Incomplete invariant architecture Points of commonality as in ordinary architecture,

points of variation are indicated but omitted Invariant architecture with explicit variation

Points of commonality as in ordinary architecture, specific variations indicated and enumerated

Page 34: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

34

Example Reference Architecture

Structural viewof Lunar LanderDSSA

Invariant withexplicit pointsof variation Satellite relay Sensors

Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; (C) 2008 John Wiley & Sons, Inc. Reprinted with permission.

Page 35: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

More Specific Example

OODT (Object Oriented Data Technology) framework

Catalog and Archive Service component

35

Page 36: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management

04/11/23 ESIP-SUMMER1036

Managing the locations and ancillary information about files, and collections of files Ancillary information is metadata

What’s a product? A collection of some set of files, and/or

collections of files So, you could have collections of other collections

Along with metadata about the product

Page 37: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Core Terminology

04/11/23 ESIP-SUMMER1037

Page 38: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Features (1/4)

04/11/23 ESIP-SUMMER1038

Persisting archived files using dynamic metadata and flexible, adaptable policies based on product types rather than the monolithic and inflexible old method of

ProductTypeRepository/ProductName/ProductVersion/ as the filesystem location to store products for all product types.

Clearly separating out the Workflow aspects of the File Manager, from Product ingestion, and flexibly supporting association of Workflows and their subsequent Tasks with any event, not only ingestion.

Page 39: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Features (2/4)

04/11/23 ESIP-SUMMER1039

Leverage existing transactional models such as Java's Transaction API to support transactional management rather than building our own API.

If we do use any database communication, then making sure that all DB communication is dealt with using standard, available, existing db pooling APIs such as commons-dbcp , available from Apache .

Page 40: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Features (3/4)

04/11/23 ESIP-SUMMER1040

Clearly separating out the administrative portions of policy management from the existing webapp, and distinguishing what pieces of the webapp are user-centric, and what are administrative-centric.

Supporting heirarchical product structures, such as nested directories that contain many sub-directories, and sub-directories of those sub-directories, with files strewn about at all levels rather than only supporting the existing method of

flat product structures, where all files in a product are at the same tree level.

Page 41: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Features (4/4)

04/11/23 ESIP-SUMMER1041

Support metadata extraction based on product type or mime-type

Support dynamic product types. The file management component should not need to know about every product type a priori

Page 42: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Architectural Implications (1/4)

04/11/23 ESIP-SUMMER1042

Managing files Repository: follow the typical repository pattern Manage information about Products, Product Types, and

References to products Managing metadata

Catalog: follow the typical registry pattern Manage product Metadata

Key/Value pairs Separate out the repository and the catalog

This allows data and metadata to be managed independently

Page 43: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Architectural Implications (2/4)

04/11/23 ESIP-SUMMER1043

Need a way to transfer a product from the client to the File Management service Client gives URIs of files, or collections of files,

which identify References belonging to a Product

How does the transfer actually occur? Can have many different types of data transfer

Local Use native system calls, or cp

Remote Use whatever protocol you want, REST, XML-RPC,

SOAP, WebDAV, etc. Don’t use CORBA or RMI: they’re sooooo last year!

Page 44: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Architectural Implications (3/4)

04/11/23 ESIP-SUMMER1044

Translating the URIs from the client to the File Manager presents an interesting challenge For example, where should

file:///home/chris/myfile.file be transferred to on the File Manager’s system?

Leverage and extend existing CAS method Existing CAS would have answered the above

questions with ProductTypeRepositoryPath/ProductName/VersionId/

Why should that be the only answer?

Page 45: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Architectural Implications (4/4)

04/11/23 ESIP-SUMMER1045

Have the concept of a Versioner interface Versioner is called by the File Manager before

the product is transferred from the client to the File Manager system (or by the system to itself) Versioner uses the Product metadata, and the

original product references to generate data store URIs that tell the DataTransfer implementation where to physically transfer the files for a particular Product

Where did I get the name Versioner? Don’t ask!

Page 46: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management: Architectural Conclusion

04/11/23 ESIP-SUMMER1046

So, how do we put all these different generic interfaces together?

Well, something like the following A File Manager has…

A repository manager that controls how data is stored A catalog, to store metadata and product instance

information to A set of Versioners that are associated with Product Types

in order to figure out how to generate the reference data store URIs for a particular product

A Data Transferer that moves a Product’s file from the client to the File Manager using the source URIs and the data store URIs

An external interface to it (e.g., XML-RPC, WebDAV, etc.)

Page 47: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

File Management Architecture

04/11/23 ESIP-SUMMER1047

Page 48: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management

04/11/23 ESIP-SUMMER1048

Modeling, executing and monitoring groups of one or more Workflow Tasks

Tasks could be A script file A java process An external command A call to a web service Many more…

Page 49: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow

04/11/23 ESIP-SUMMER1049

Workflow has many definitions It’s typically represented as a graph

In traditional science data pipeline systems, this graph is constrained to be a sequential set of process nodes

Taxonomy of Workflow Management Systems http://www.gridbus.org/reports/GridWorkflowTaxonomy.pdf

Workflow Patterns http://is.tm.tue.nl/research/patterns/

Task A

Task B

Task C

Task D

Task E

Page 50: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

04/11/23 ESIP-SUMMER1050

Workflow Management: Core Terminology

Page 51: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management Features

04/11/23 ESIP-SUMMER1051

Workflow should be represented as a graph. This will allow for true parallelism.

Workflow Management should support identified workflow patterns especially control-flow. The current level of support for control-flow has to a large

extent been relegated to tasks. A collection of tasks is associated with a product ingestion and there is only a priority to sort out the order of execution.

Data-flow should be captured. The workflow should be able to minimally hook

together input and output streams between tasks. Workflow need not have any interaction with a

database What if I want to persist a workflow in XML? Or as a flat file, or some other lightweight format

Page 52: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management: Architectural Implications (1/3)

04/11/23 ESIP-SUMMER1052

Workflow Repositories Places to go and fetch and “abstract” workflow

description from Places to store running “workflow instance”

information Workflow Execution Engines

Give it an abstract workflow, and let it rip Turns an abstract workflow into a “Workflow Instance”

Should allow monitoring of the workflow instance System interface

Associate abstract workflows with “events” This way, workflows can be tied to things other than

just product ingestion

Page 53: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management: Architectural Implications (2/3)

04/11/23 ESIP-SUMMER1053

The Workflow Repository need not be a relational Database It could be a flat file A (set of) XML file(s) An object database Factories create Workflow Repositories, which create

Workflows Tasks are associated with “Workflows”, not

“Product Types” This decouples workflow from the File Management

aspects of the CAS Conditions can be pre, or post

Page 54: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management: Architectural Implications (3/3)

04/11/23 ESIP-SUMMER1054

Workflows are interfaces They could be backed by a (directed graph), or by an

iterator (i.e., a sequential pipeline) or by a HashMap Workflow Tasks have clearly separated out

dynamic and static metadata, and they can share metadata Dynamic metadata is passed via the Workflow Engine

between all the tasks in a workflow They can all read/write to it

Static metadata is associated with each workflow task

Page 55: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Execution

04/11/23 ESIP-SUMMER1055

Once you’ve got a Workflow, how do you execute it and turn it into a Workflow Instance?

You hand it off to a Workflow Engine Workflow Engine manages:

A configurable, extensible thread pool “Worker Threads” are used to process the Workflow

Instance they are each handed A queue of worker threads if they aren’t any

available workers in the thread pool to process a Workflow

Monitoring which Workers are handling which Workflow Instances, and the state and status of each Workflow Instance

Workflow Engines execute instances of Workflows

Page 56: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

What is the external interface to the system?

04/11/23 ESIP-SUMMER1056

Event-based Event names come into the Workflow Manager The Workflow Manager looks up any Workflows

associated with the event name The Workflow Manager then calls the Workflow

Repository to obtain representations of the Workflow

The Workflow Manager then hands off Workflow representations to the Workflow Engine for execution

Current implementation uses XML-RPC, but it’s an interface, so it could use REST/HTTP/SOAP/etc.

Page 57: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management: Architectural Conclusion

04/11/23 ESIP-SUMMER1057

So, how do we put all of these things together? Well, something like:

A Workflow Manager hasA Workflow Repository to obtain abstract

Workflow descriptions fromA Workflow Instance Repository to

store/persist running Workflow Instance information

A Workflow Engines to execute Workflows on

An external interface

Page 58: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Workflow Management Architecture

04/11/23 ESIP-SUMMER1058

Page 59: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management

04/11/23 ESIP-SUMMER1059

Resource management is the notion borne from the high performance computing and grid communities dealing with the execution of Jobs, and Tasks across heterogeneous computing resources including grids, clouds, clusters and individual Resource Nodes

Involves monitoring the underlying hardware resources Disk space, CPU utilization, Load, etc., across the

nodes Should provide an easy to use façade for the

workflow manager to pipeline jobs to

Page 60: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

04/11/23 ESIP-SUMMER1060

Resource Management: Core Terminology

Page 61: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management: Definitions

04/11/23 ESIP-SUMMER1061

Job - an abstract representation of an execution unit, that stores information about an underlying program, or execution that must be run on some hardware node ,including information about the Job Input that the Job requires, information about the job load, and the queue that the job should be submitted to.

Job Input - an abstract representation of the input that a Job requires.

Job Spec - a complete specification of a Job, including its Job Input, and the Job definition itself.

Job Instance - the physical code that performs the underlying job execution.

Resource Node - an available execution node that a Job is sent to by the Resource Manager.

Page 62: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management: Features

04/11/23 ESIP-SUMMER1062

Easy execution - of compute jobs to heterogeneous computing resources, with very different underlying specifications: large and small disks, network file storage, storage area networks, and exotic processor architectures.

Cluster Management Pluggability - the ability to plug into existing batch submission systems (e.g., Torque, LSF), and resource monitoring (e.g., Ganglia).

Scalability – The Resource Manager uses the popular client-server paradigm, allowing new Resource Manager servers to be instantiated, as needed, without affecting the Resource Manager clients, and vice-versa.

Communication over lightweight, standard protocols – The Resource Manager uses XML-RPC, as its main external interface, between Resource Manager client and server. XML-RPC, the little brother of SOAP, is fast, extensible, and uses the underlying HTTP protocol for data transfer.

Wrapping - the use of wrappers to insulate the internal code of Job Instances from their external interfaces allows a variety of different popular programming languages (e.g., shell scripting, Java, Python, Perl, Ruby) to be used to implement the actual job.

Scheduler Pluggability - the ability to define the underlying job scheduling policy.

XML-based job description - allows for existing XML-based editing tools to visualize the different job properties, and for standard job definitions, and interchange.

Page 63: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management: Architectural Implications (1/2)

04/11/23 ESIP-SUMMER1063

Batch Manager responsible for sending Jobs to the actual nodes that the

Resource Manager determines that it is appropriate that they execute on.

Job Queue responsible for queuing up Jobs when the Resource Manager

determines that there are no Resource Nodes available to execute the Job on

persistence, and queuing policy (e.g., LRU, FIFO) are all dealt with by this extension point.

Job Repository responsible for actual persistence of a Job, throughout its

lifecycle in the Resource Manager retrieve Job and Job Spec information whether the Job is queued,

or executing, or finished.

Page 64: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management: Architectural Implications (2/2)

04/11/23 ESIP-SUMMER1064

Monitor responsible for monitoring the execution of a Job once it

has been sent to a Resource Node by the Batch Manager extension point.

Job Scheduler responsible for determining the availability of

underlying Resource Nodes determining the policy for pulling Jobs off of the Job

Queue to schedule for execution, interacting with the Job Repository, the Batch Manager, the Monitor

System provides the external interface to the Resource

Manager services.

Page 65: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Resource Management: Architectural Conclusion

04/11/23 ESIP-SUMMER1065

So, how do we put all of these things together? Well, something like:

A Resource Manager has A Job Queue to hold Jobs that cannot be run for

scheduling or resource constraint reasons and to provide Jobs to the Scheduler.

A Scheduler to implement a policy for determining which Jobs are ready to run.

A Monitor to determine the current state (disk space, availability) of Resource Nodes in the system to run Jobs on.

A Batch Submission system to physically execute jobs on remote Resource Nodes.

A Job Repository to record the current state of a running Job.

An external interface

Page 66: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

04/11/23 ESIP-SUMMER1066

Resource Management Architecture

Page 67: Exploiting Reference Architecture to Guide the NASA Earth Science System Enterprise Chris A. Mattmann NASA Jet Propulsion Laboratory University of Southern

Conclusions

Domain specific software engineering, reference architectures, etc. Keep it abstract, focus on terminology,

vocabulary and components/functions and styles

Cull reusable requirements, information, etc., from prior experience Need to have built it before to really get it

Lots of examples to draw from!

67