Optimising the OGSA-DAI Enactment Model

22
Optimising the OGSA-DAI Enactment Model Konstantinos Karasavvas Research Associate NeSC, University of Edinburgh

description

Optimising the OGSA-DAI Enactment Model. Konstantinos Karasavvas Research Associate NeSC, University of Edinburgh. Overview. Background: OGSA-DAI Workflow distinctive features Enactment Model optimisation Reconstruction Scenarios And future work Summary. OGSA-DAI in a nutshell. - PowerPoint PPT Presentation

Transcript of Optimising the OGSA-DAI Enactment Model

Page 1: Optimising the OGSA-DAI Enactment Model

Optimising the OGSA-DAI Enactment Model

Konstantinos Karasavvas

Research Associate

NeSC, University of Edinburgh

Page 2: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 2

Overview

● Background: OGSA-DAI Workflow distinctive features

● Enactment Model optimisation

● Reconstruction Scenarios And future work

● Summary

Page 3: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 3

OGSA-DAI in a nutshell

● An extensible framework for data access and integration● Expose heterogeneous data resources to a grid through

web services● Interact with data resources

Queries and updates Data transformation / compression Data delivery Application specific functionality

● A base for higher-level services Federation, data mining, visualisation

● Reduce development cost of data centric grid applications by providing useful functionality readily packaged

Page 4: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 4

OGSA-DAI Request/Response

Request

OGSA-DAIData

Service

Response

Activity A

3rd Party

Activity B Activity C

DB

Page 5: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 5

Example OGSA-DAI Request

sqlQueryStatement

•SELECT * FROM Bands WHERE name = Bangles;

sqlResultsToXML

deliverToURL

•ftp://www.musicplace.org/bands/Bangles.html

xslTransform

deliverFromURL

•http://www.someplace.org/stylesheets/webRowSetToHTML.xsl

ResultSet

XSL

HTML

WebRowSet

Page 6: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 7

Workflow Distinctive Features (1)

● Keep everything local We have homogeneity Avoid data movement

• Call with whole result• Separate calls

E.g. we can pass object references● Activities are configured at

service deployment Cannot use any “service” you want in

your workflow

sqlQuery

transform

RS

sqlQueryService

transformService

SOAP/XML

Page 7: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 8

Workflow Distinctive Features (2)

● Simple, efficient workflow language Sequence, flow Fits our data processing needs Other constructs can be used at the activity level (e.g.

exclusive choice – a.k.a. if-split)

if-splitbegin

if-splitend

A

Bx ypipe

closespipe

closes

Page 8: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 9

Workflow Distinctive Features (3)

● Streaming model Large quantities of data Parallel processing (pipelining) Implicit iteration via streaming

Page 9: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 10

Enactment Model

● A.k.a. Activity Framework

● Core component of OGSA-DAI

● It is responsible for performing tasks (activities) and streaming data

DB Query

Delivery

block

block

Produces data in blocks

Stores and provides access to data blocks

Consumes data blocks

Pipe

Page 10: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 11

Activity Processing (Current Release)

● Processing of blocks (and therefore activities) is controlled by the pipe – from outside the activity processBlock() is called many times until

processing is complete Usually consumes and produces a single

block per call

Page 11: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 12

Activity Processing (New)

● Processing of blocks will be controlled by the activity process() is called exactly once Consumes and produces blocks as necessary Each activity in a pipeline processes within

each own thread Pipes receive and may buffer blocks until they

are requested

Page 12: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 13

Current Model

Activity AprocessBlock()

Activity BprocessBlock()

RequestProcessor

processBlock

getBlock block

processBlock block

Called repeatedly

Pipe

Page 13: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 14

New Model

Activity Aprocess()

Activity Bprocess()

getBlock

process putBlock

blockas result

ProcessingService initialise

process

Called Once

Pipe

Page 14: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 15

Improvements to the Enactment Model

● Each activity is run in its own thread Rather than one thread per chain

● Each activity is called to process only once Rather than once per block

● Each activity sends its result to the pipe when ready Rather than wait to be called

● The pipe now buffers Rather than delegate the request for new block

● Performance improvements

Page 15: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 16

Mobile Code

● Allows to ‘embed’ functionality in your workflow Allows dynamic inclusion of new code Extends the workflow functionality without calling to a

remote service Simple but ‘prepared’ code

Mobile CodeActivity A Activity B

Page 16: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 17

Workflow Reconstruction

● Be able to identify patterns Describe workflow nodes/edges

● Reconstruct part of the workflow graph Performance

● Some example scenarios

Page 17: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 18

Scenario (1)

sqlQuery RS RSToWebRowSet WebRowSetProjectionWRS

sqlQuery RS resultsetProjection RSToWebRowSetRS

WRS

WRS

Page 18: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 19

Scenario (2)

FTPA

filename

file

URL

FTPA

filename

file

URLSplit

FTPA

filename

file

URL

FTPA

filename

file

URL

Page 19: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 20

Thoughts on Reconstruction

● Currently recommendations Not automated

● How and what do we describe? Scenario 1

• Semantics of projection• Activities’ I/O typing

Scenario 2• Can be applied in many scenarios• Rules needed

When are two workflows equivalent?• Models of enactment and activities

How do we estimate/predict the cost of a workflow?● Future work

Need to investigate the above

Page 20: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 21

Thoughts on Parallelisation

● Parallelising the execution of OGSA-DAI already exploit thread parallelism

● Multiple nodes/JVM running activities

● Requires serialisation of objects passing between activities When and where do we serialise?

● Future work Need to investigate the above

Page 21: Optimising the OGSA-DAI Enactment Model

eSI - WODE, 19 Oct. 06 22

Summary

● Overview of OGSA-DAI workflow Motivation Distinctions

● Enactment optimisations Improved pipeline processing

● Workflow reconstruction and parallelisation

Page 22: Optimising the OGSA-DAI Enactment Model

Questions?

www.ogsadai.org.uk

[email protected]