Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Flexible Scientific Workflows Using Dynamic Embedding Anne H.H. Ngu, Nicholas Haasch Terence.

Similar presentations


Presentation on theme: "Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Flexible Scientific Workflows Using Dynamic Embedding Anne H.H. Ngu, Nicholas Haasch Terence."— Presentation transcript:

1 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Flexible Scientific Workflows Using Dynamic Embedding Anne H.H. Ngu, Nicholas Haasch Terence Critchlow Shawn Bowers, Timothy McPhilips, Bertram Ludaescher

2 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Outline Scientific Workflow Problems with static scientific workflow Frame actor Dynamic Embedding Implementation of Dynamic Embedding TSI case study Conclusion

3 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Scientific Workflows A model of the way a scientist works with their data and tools Mentally coordinate data export, import, analysis and visualization via various software tools Goals: Design Automation Component reuse … make data analysis and management tasks easier for the scientist!

4 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 SPA/Kepler Scientific Workflow System Scientific Process Automation (SPA) Modeling Workflows using actor-oriented framework Executing and Monitoring Workflows Built on top of Ptolemy II (Berkeley) Graphical User Interface Similar to a charting program (Visio) Drag-and-Drop Components Connect components Execute workflows Monitor Execution Ptolemy II SPA

5 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Actors single component or task well-defined interface (signature) given input data, produces output data

6 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Ports each actor has a set of typed input and output ports input ports consume data (tokens) output ports produce data

7 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Parameter Input that is configured statically User changes at design Produces data

8 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Dataflow Connections actor “communication” channels connect output ports with input ports data is transmitted with tokens

9 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Sub-Workflows (aka Composite Actors) composite actors “wrap” sub-workflows like actors, have signatures (i/o ports of sub-workflow) hierarchical workflows (arbitrary nesting levels) for abstraction versus ‘Atomic Actors'

10 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Actor-Oriented Modeling Directors define the execution semantics of workflow graphs schedule and execute workflow graphs sub-workflows may be governed by different directors Examples: Synchronous Data-Flow (SDF), Process Networks (PN), Discrete Event (DE), Finite State Machine (FSM)

11 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Data Process Network (PN) Domain Each actor run in its own thread Actors run in parallel Actor communication is asynchronous Commonly used in Scientific Workflows Streaming data Concurrency

12 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Problems in current SPA/Kepler modeling framework Workflow is static and must be completely specified before orchestration Specific tools used in the workflow must be picked at design time ( It may not be picking the best tool ) All alternative tools must be enumerated exhaustively ( resulted in complex workflow )

13 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Problems in current SPA/Kepler modeling framework (cont.) Our work aims to provide an abstraction of a tool, a resource, or an algorithm Specific tool or resource resource is selected during execution

14 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Terascale Supernova Initiative (TSI) Workflow

15 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Different TSI Workflows Each containing a Submit Job Actor A BC

16 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 TSI Submit Job Actors …when we look at the sub-workflows Each workflow does job submission in a different way Each containing a remote execution A C B

17 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Goals There exists actors (atomic and composite) that perform a similar task Submit Job Transfer Files Process Files RemoteExection SSH2Exec SSHWrapper InvokeSubmitJob Can we provide an abstraction for encapsulating different implementations of a specific task that can be reused across different workflows? Can we execute the workflow flexibly? Choosing a specific implementation depending on runtime condition

18 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Requirements  Select and execute actor based on run time conditions  Execute with data process networks Built in capability for streaming data Built in concurrency  Selected actors instantiated on demand  Reusable actor can be nested  Actors are usable by scientist

19 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Frames Actors are concrete Correspond to particular implementations Frames are abstract Placeholder for actor / composite actor input, output, and parameter ports An embedding occurs when a actor is placed in a frame A refinement is an actor that can be embedded in a frame F a Embedding F[a] F a RemoteExecutionFrame F SSH Actor a a

20 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 SSH2 Exec Web Service Web Service SSH2 Exec Static Embedding Frames A refinement to a Frame is embedded during design Frames become concrete and cannot be reconfigured during workflow execution F Design Time Web Service SSH2 Exec Run Time

21 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Static Embedding Frames (cont.) Developer defines different frame actors defines possible refinement (behavior patterns) User adds and configures frame at design time chooses refinement at design time Frame can be reconfigured by changing parameters before execution Actor 1Actor n … t1 t2 t3 (State) Frame Implementation – Composite Actor (Dataflow) T T F FST F

22 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Static Embedding Frames (cont.)  Execute with data process networks  Refinement instantiated as needed  Can be nested  Actors are usable by scientist  Select refinements based on run time conditions SSH2 Exec F Run Time Web Service F

23 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Dynamic Embedding Frames Refinement to frames are embedded during execution Frames are not concrete during workflow execution SSH2 Exec Web Service Web Service SSH2 Exec F Web Service SSH2 Exec Run Time

24 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Why Dynamic Embedding?  Select refinements based on run time conditions  Execute with data process networks  Refinement instantiated as needed  Can be nested  Actors are usable by scientist

25 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Implementation Of Dynamic Embedding Construct a new workflow to execute the actor Generates Remote Execution Frame Generated Workflow

26 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Dynamic Embedding Process 1. Wait for inputs to arrive to the Frame. 2. Select a refinement. 3. Transfer of input tokens from Frame to the refinement. 4. Select mappings Input Port Output Port Parameter 5. Constructs internal workflow. 6. Run internal workflow. 7. Transfer of output tokens from the refinement to the Frame. Model Generated By Dynamic Frame Remote Execution Frame

27 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 ModelReference Actor A higher order actor that can execute a given model (workflow) through its input port. It fits most of the requirement for dynamic embedding except: User must pre-construct the given model Output tokens from the given model are transferred only after completion of the internal workflow. Our implementation of dynamic embedding leverage the capability of ModelReference actor with two major improvements: The given model is constructed automatically Output tokens are transferred synchronously Frame is thus implemented as a subclass of ModelReference actor with four additional components: SelectActor(), FrameSourceActor(); FrameSinkActor() and PortWiring()

28 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Implementing a Type of Frame Subclass Frame and Implement Selection Process selectActor() Configure Ports and Parameters getIntputMappings() getOutputMappings() getParameterMappings()

29 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Selection Process: selectActor() Implements selection policy Returns a refinement Refinement that is returned gets automatically embedded Remote Execution String selectedActor selectActor(){ If(testWebService()) selectedActor = “webservice” return getWebServiceActor() else selectedActor = “ssh2exec” return getSSH2ExecActor() }

30 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Port Wiring Transfer Token Frame Input Port  Actor Input Port Actor Output Port  Frame Output Port Expressed as list containing pairs of strings {“hostname”,”hostname”} {“command”,”cmd”} SSH2 Exec F errors stdout errors out hostname cmd hostname command Remote Execution String selectedActor getInputPortMapping(){ if(selectedActor==“SSH2Exec”) return {{“hostname”,”hostname”} {“command”,”cmd”}} else if(selectedActor==“webservice”) return {{“hostname”,”url”} {“command”,”method”}} }

31 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 TSI-A Workflow SubmitJobFrame TSI-B Workflow TSI Case Study

32 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Remote Execution Frame SubmitJobFrame TSI-B subworkflow TSI-A subworkflow

33 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Benefits  Select refinements based on run time conditions  Execute with data process networks  Refinement instantiated as needed  Can be nested  Actors are usable by scientist

34 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Limitations Unable to type check internal workflow before execution There is overhead of creating an additional workflow to execute a refinement Change in selection process requires recoding/recompiling Can not monitor internal workflow (Useful for debugging)

35 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Future Work Semantic binding of Ports and Parameters Configurable selection criteria Intelligent brokering Ptolemy Expression Language Python Perl … Simplified refinement creation Caching of generated workflows Design time type checking of internal workflow

36 Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Work performed under the auspices of the U. S. Department of Energy by Lawrence Livermore National Laboratory under Contract W-7405-Eng-48 UCRL-ABS-226047


Download ppt "Ngu, Texas StatePtolemy Miniconference, February 13, 2007 Flexible Scientific Workflows Using Dynamic Embedding Anne H.H. Ngu, Nicholas Haasch Terence."

Similar presentations


Ads by Google