ogsa-dai architecture

23
Amy Krause EPCC [email protected] OGSA-DAI Architecture OGSA-DAI Technology Update GridWorld Community Activity GGF15, Boston, MA (USA)

Upload: others

Post on 12-Sep-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OGSA-DAI Architecture

Amy KrauseEPCC

[email protected]

OGSA-DAIArchitecture

OGSA-DAI Technology UpdateGridWorld Community Activity

GGF15, Boston, MA (USA)

Page 2: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 2

OGSA-DAI

OGSA-DAI

Outline

• Data Services

• Internals

• Extensibility Points

• Perform Documents

• Sessions

• The Activity Engine

• Activities

• Data Resources

Page 3: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 3

OGSA-DAI

OGSA-DAI

OGSA-DAI Services

• OGSA-DAI uses data services to represent and provide access to a number of data resources

acce

sses representsData Service

DataResource

DataResourceData

Resource

accesses

Page 4: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 4

OGSA-DAI

OGSA-DAI

Data Service Internals

connection role

data

datadata

query

perform document

response document

element element element

credentials

QueryActivity

TransformActivity

DeliveryActivity

Data ResourceRole

Mapper

ActivityEngine

connection

Session ID

Page 5: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 5

OGSA-DAI

OGSA-DAI

Extensibility Points

• Extensibility points in OGSA-DAI can be used to implement very powerful additions– Activity Framework– Data Resources– Role Mapping– Engine

• Allow applications to be tailored for specific tasks

Page 6: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 6

OGSA-DAI

OGSA-DAI

The Activity Engine

• The Engine is the central OGSA-DAI component

• Dictates behaviour when perform documents are submitted– Manages concurrent requests and sessions– Parses and validates perform document– Identifies required activities implementations– Processes activities– Composes response document– Returns response document to the service layer

perform document

response document

TheEngine

Page 7: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 7

OGSA-DAI

OGSA-DAI

Concurrent Requests

• New in Release 7:

• Concurrent requests

• Request queueing

• Sessions

Page 8: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 8

OGSA-DAI

OGSA-DAI

PerformPerform

Perform Documents

• Perform documents– Encapsulate a serialisation of multiple interactions with a service into

a single interaction– Abstract each interaction into an “activity”– Data can flow from one activity to another– No control constructs present

– no conditionals, loops or variables

• Not intended for human consumption– Generated and processed by client toolkit

Query Transform Deliver

Page 9: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 9

OGSA-DAI

OGSA-DAI

Example Perform Document<?xml version="1.0" encoding="UTF-8"?>

<perform xmlns="http://ogsadai.org.uk/namespaces/2005/03/types">

<documentation>This example performs a simple select statement to retrieve 100 rows from the test database. The results are delivered in the response document.

</documentation>

<sqlQueryStatement name="statement"><expression>select * from littleblackbook where id &lt;= 100</expression><webRowSetStream name="statementOutput"/>

</sqlQueryStatement>

</perform>

Page 10: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 10

OGSA-DAI

OGSA-DAI

Sessions

• Sessions provide the ability to store state across multiple requests– e.g. a JDBC connection can be shared in order to process multiple

requests in a transaction

• State is stored and modified in property objects which can be accessed by all activities within a session

Request1 SessionSession

Request2State

Page 11: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 11

OGSA-DAI

OGSA-DAI

Sessions

• A new session for multiple request must be requested explicitly, by sending a openSession request

• The service provides a unique session ID

• Follow-on requests may join this session by referencing the session ID

• A session may be terminated explicitly or left to expire

• An implicit session is started automatically by any request that doesn’t reference another session– This session is terminated after the request

Page 12: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 12

OGSA-DAI

OGSA-DAI

Sessions

Session

ClientClientServiceService

open session

Session ID

creates uses

Page 13: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 13

OGSA-DAI

OGSA-DAI

Activities

• An Activity dictates an action to be performed– Query a data resource– Transform data– Deliver results

• Engine processes a sequence of activities

• Subset of activities available to a Data Resource– Specified in configuration files

• Data can flow between activities

HTMLdata

WebRowSetxml data

SQLQuery

Statement

XSLTTransform

DeliveryToURL

Page 14: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 14

OGSA-DAI

OGSA-DAI

OGSA-DAI Deck of Activities

Page 15: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 15

OGSA-DAI

OGSA-DAI

Activity Taxonomy

• Predefined activities fall into three categories:

• Statement–Interact with the data resource, e.g. direct an SQL query to a DBMS

• Delivery–Deliver data to a third party

• Transform–Perform transformations on data, e.g. XSL Transform, compression

Page 16: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 16

OGSA-DAI

OGSA-DAI

Building Blocks – Predefined Activities

sqlQueryStatement

sqlStoredProcedure

sqlUpdateStatement

sqlBulkLoadRowset

xPathStatement

xUpdateStatement

xQueryStatement

xmlResourceManagement

xmlCollectionManagement

relationalResourceManager

gzipCompression

zipArchive

xslTransform

inputStream

outputStream

DeliverFromURL

DeliverToURL

DeliverToGFTP

DeliverFromGFTP

DeliverToStream

DeliverFromGDT DeliverToGDT

Page 17: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 17

OGSA-DAI

OGSA-DAI

Activity Implementations

• Extensibility point• All Activity implementations extend the abstract

Activity class

Page 18: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 18

OGSA-DAI

OGSA-DAI

SQLQuery

Statement

Activity Inputs and Outputs

• Activities read and write blocks of data– Allows efficient streaming between activities– Reduces memory overhead

• A block is a Java Object– Untyped but usually a String or byte array

• Interfaces for reading and writing– BlockReader and BlockWriter

XSLTransform

Activity

DeliverTo URL

Page 19: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 19

OGSA-DAI

OGSA-DAI

Custom Activities

• Users can develop additional activities– To support different query languages

– e.g. XQuery– To perform different kinds of transformation

– e.g. STX– To deliver results using a different mechanism

– e.g. WebDAV

• An activity has the following components– Java implementation– XML schema– Configuration (optional)– Client toolkit implementation (optional)

Page 20: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 20

OGSA-DAI

OGSA-DAI

Advantages of the Activity Model

• Avoid multiple message exchanges

• Extensible– Developers can add functionality– Could import third party trusted activities

• Allows for optimisation– Engine can optimise workflow

Page 21: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 21

OGSA-DAI

OGSA-DAI

Data Resources

• Provides clients with a concept of a logical data resource against which activities can be run.

• Holds the all the configuration information needed by activities to access the external physical data resources that make up the logical data resource.

• Manages the activities' interaction with the external physical data resources.

Page 22: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 22

OGSA-DAI

OGSA-DAI

Relationaldatabase

Data Resources

• Provided for JDBC, XML:DB and file systems

• Can be extended for any other data source– e.g. web server, WebDAV server, streams

open connection

close connection

JDBCConnectionManager

open connection

release connection

SQLQuery

Statement

Page 23: OGSA-DAI Architecture

6 October 2005 http://www.ogsadai.org.uk/ 23

OGSA-DAI

OGSA-DAI

Summary

• The Engine is the central component of a data service

• Activities perform actions– Querying, Updating– Transforming– Delivering

• Data Resources manage access to underlying data resources

• Architecture designed for extensibility– New Activities– New Role Mappers– New Data Resources