110 likes | 231 Views
LQCD Workflow Project. L. Piccoli October 23, 2006. Kepler slides of Kun Xiao ( kxiao3@iit.edu ). What flows through an object is sequential control. class name. data. methods. call. return. Actor-Oriented (A-O) Design in SWF. Object orientation:. Actor orientation:.
E N D
LQCD Workflow Project L. Piccoli October 23, 2006 Kepler slides of Kun Xiao (kxiao3@iit.edu)
What flows through an object is sequential control class name data methods call return Actor-Oriented (A-O) Design in SWF Object orientation: Actor orientation: What flows through an object is streams of data actor name data (state) parameters Input data Output data ports Borrowed from the *.ppt slides by Edward A. Lee (See References)
One Class of Semantic Models: Producer / Consumer process { … write(); … } process { … read(); … } channel port port receiver Model of Computation (MoC) • Semantic interpretations of the abstract syntax • Different models <=> Different semantics <=> Different execution • Models of Computation: • continuous-time • dataflow • rendezvous • discrete events • synchronous • time-driven • publish/subscribe • … • Are actors active? passive? reactive? • Are communications timed? synchronized? buffered? Borrowed from the *.ppt slides by Edward A. Lee (See References)
What is Kepler • An open source project • Build on Ptolemy II • Kepler is a software application for the analysis and modeling of scientific data. • Create executable scientific workflows by simply dragging and dropping components.
Strength of Kepler • Concurrency and communication between components • Separates two modeling concerns: component communication (dataflow) and overall workflow coordination (orchestration).
Basic Components in Kepler • Directors • Actors • Parameters • Ports • Relations
CSP Graph Data Kernel CT PN Actor Math DE FSM SDF Software Architecture of Ptolemy II
Anatomy of an actor in Kepler public class ActorClassName extends BaseClass implements MarkerInterface { public ActorClassName (CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException { super(container, name); // Create and configure ports, e.g. ... portName = new TypedIOPort(this, " portName ", true, false); // Create and configure parameters, e.g. ... parameterName = new Parameter(this, " parameterName "); parameterName.setTypeEquals(BaseType.DOUBLE); } //// ports and parameters //// public TypedIOPort portName; public Parameter parameterName; …
Anatomy of an actor in Kepler //// public methods //// public void fire() { ...read inputs and produce outputs... } public void initialize() { ...initialize local variables... } public boolean prefire() { ...determine whether firing should proceed and return false if not... } public void preinitialize() { ...set port types and/or scheduling information... } public boolean postfire() { ...update persistent state... ...determine whether firing should continue to next iteration and return false if not... } public void wrapup() { ...display final results... } }