Taskflow-oriented Programming: A Method to Configure a ... · A Method to Configure a Universal...
Transcript of Taskflow-oriented Programming: A Method to Configure a ... · A Method to Configure a Universal...
© CBL/NCSU All Rights Reserved
Page 1 of 61
Taskflow-oriented Programming:A Method to Configure a Universal Clientfor Distributed Collaborative Computing
Franc Brglez, Hemang Lavana Collaborative Benchmarking Laboratory (CBL)
Dept. Comp. Science, NC State University
http://www.cbl.ncsu.edu/
Text
© CBL/NCSU All Rights Reserved
Page 2 of 61
Contents
Background and MotivationRelated WorkProject Drivers and GUITask Architecture and XML Schema RepresentationA Demo with Two Simple TasksA Demo with Concurrent Executions
..................................TaskFlow ArchitectureCollaborative Computing with TaskflowsConclusion and Summary
© CBL/NCSU All Rights Reserved
Page 3 of 61
Background and Motivation
Megaprogramming (Wiederhold 1992)Interactive programming (Wegner 1997)
What problem are we solving?What is a whitebox?Simple examples to illustrate needsWhat about protocols
© CBL/NCSU All Rights Reserved
Page 4 of 61
What Problem are We Solving?
Given: L blackbox components (executable programs) and test data,M whitebox components (explained below),N owners (up to L+M),K hosts (up to L+M).
Problem: create a new whitebox component and execute
Definitions:Task is a process of invoking and executing a componentTaskflow is a directed graph with tasks and data as vertices,task-to-task control-edges and data-to-task or task-to-data data edgesWhitebox component is a taskflow containing up to L+M components
© CBL/NCSU All Rights Reserved
Page 5 of 61
What is a Whitebox Component?
White box component is a taskflow containing up to L+M components:Programmable
- tasks can be sequenced serially or concurrently- the order of sequence can be decided by data- task may be repeated a number of times- only one entry and one exit point
Interactive, user-configurable during runtime - enabling/disabling of control edges to control the scope of execution- enabling/disabling taskflow for execution with local or global flow data
Collaborative - asynchronous mode- synchronous mode
Platform-independent - accessible from a web browser
© CBL/NCSU All Rights Reserved
Page 6 of 61
Simple Examples to Illustrate Needs
Task chaining (download address and print)
Task concurrency (check airfares with two on-line agents)
Task synchronization (select best fare and reserve itinerary)
Task cancellation (cancel 3rd query if reasonable price with first two)
Task reconfiguration (add one more on-line agent for search)
Synchronous collaboration (ask spouse to confirm itinerary)
Asynchronous collaboration (notify company to pay the fare)
Platform-independent (web-based access)
© CBL/NCSU All Rights Reserved
Page 7 of 61
What Protocols Can We Use
If components are X-compliant , where X = {rpc, CORBA, JavaRMI, SOAP},protocols such as rpc, CORBA, JavaRMI, SOAP may be used
... when creating a whitebox?
If components are not X-compliant ,protocols such as ftp, telnet, http, ssh may be used
In this research, we deal with components that are not X-compliant
© CBL/NCSU All Rights Reserved
Page 8 of 61
Related Work• Structured Workflow Modeling: http://www.icis.qut.edu.au/~arthur
•ToolWire http://www.toolwire.com
• Web-Based Electronic Design (WELD), WebTop, and CollabTop http://www-cad.EECS.Berkeley.EDU/Respep/Research/weld http://www-mit.mit.edu/CAPAM/demo-posters/deba
• Groupkit http://www.cpsc.ucalgary.ca/grouplab/groupkit
• Collaboratory for the Web: TANGO http://trurl.npac.syr.edu/tango
• VNC: Virtual Network Computing http://www.uk.research.att.com/vnc
© CBL/NCSU All Rights Reserved
Page 9 of 61
Highlights of on-going research
• a taskflow architecture to support concurrency
• a highly interactive GUI-based taskflow design and execution environment
• support for task ownership during asynchronous collaboration
• rendering collaboration-unaware tcl-applications collaborative
• web-accessibility of standalone tcl-applications
© CBL/NCSU All Rights Reserved
Page 10 of 61
Ranking Programming Languages for Concurrency Support
programming effort
concurrencysupport
low high
high
low
System languages (Ada, Java, ...)
A taskflow environment (cntML, based on XML)
Scripting languages (perl, python, tcl, ...)
The taskflow environment extends the capabilities of scripting languages twofold:(1) concurrency support without the complexity of thread programming(2) a highly interactive GUI taskflow design and execution environment
© CBL/NCSU All Rights Reserved
Page 11 of 61
Software vs Hardware Programming
T3bT1 T3a
T2a
T2bB1C1
i_t1 B2
C2
t1t2a
t2at3a
t2bt3a
t3at3b t3b_o
C3
A1
P1 P3P2P2
C1 B1 B2 C2
A1
C3
Module “X” in tcl
Module “X” in verilog
t1t2b
© CBL/NCSU All Rights Reserved
Page 12 of 61
Project Drivers and GUI
OpenDesign project (year 2000 of DARPA-funded Vela project)
OpenExperiment project (year 2000 of DARPA-funded Vela project)A prototype infrastructure for distributed and collaborative experimentaldesign, evaluating the performance of algorithms solving NP-hard problems,including the generation of equivalence class data sets.
OpenWriter project (senior class project)
http://www.ncsu.edu/OpenProjects/
Updates
A prototype infrastructure for distributed and collaborative VLSIsystems design, bringing together a number of university-basedand commercial electronic design automation tools.
A prototype infrastructure for distributed and collaborative writing,editing, and camera-ready technical report,article, and bookcomposition, using a number of open source software and utilities.
© CBL/NCSU All Rights Reserved
Page 13 of 61
pargen mentorWeb postproc extrstats
rootNameclasstreatmentinstanceNumdirNamestatsFile
rootNameclasstreatmentinstanceNumdirNamezipFile
URLinstanceNumverilogFileparFile
rootNameclasstreatmentinstanceNumdirNameverilogFileplcFile (opt)
tabFilestatsFileplcFile_TRxx
parFile zipFile
tabFile
rootNameclasstreatmentinstanceNumdirName
mentorflow
OpenDesign TaskFlow Example: NCSU--MSU (DAC’2000)
© CBL/NCSU All Rights Reserved
Page 14 of 61
A Tree View of a Hierarchical Taskflow
- (taskFlowInstance1 - InputList
• mIn1 = “fileIn1.t”• mIn2 = “fileIn2.t”
- OutputList• mOut1 = “fileOut1.r”
- TaskList• (Begin) |x|- (TaskA) |o|x|
+ InputList+ OutputList+ TaskList
- (TaskB) |x|+ InputList+ OutputList
+ (TaskC) |o|x|• (End)
} single task
} multi task
invoke task
open graphView
XO
© CBL/NCSU All Rights Reserved
Page 15 of 61
A Graph View of a Hierarchical Taskflow
(TaskA)
(TaskC) (End)(Begin)
(TaskB)
hierarchical task
primitive task
user-controllededge
Execute task by clicking the “task button” Abort task by clicking the “flashing task button”
FSMD states:• white (task not yet executed)• yellow (task “aborted” )• green (task “executing” )• blue (task forkCondition is “valid”)• violet (task forkCondition is “invalid”)• pink (task “timed-out” )• red (task “aborted” )
mIn1 = “fileIn1.t”
© CBL/NCSU All Rights Reserved
Page 16 of 61
Task Architecture and XML Schema RepresentationEncapsulatedSingleTask
(FSMD)EncapsulatedMultiTask
(FSMD)
SingleTaskBodyBeginForkBlackBox Comp.EndJoin
SingleTaskDefn (STD)InputPortListInOutPortListOutInPortListOutputPortList
MainTaskTaskInstanceListTaskGraphBeginForkTaskInstance1...EndJoin
TaskInstanceControlJoinDataMuxEncapsulatedTaskControlFork
MultiTaskBodyBeginForkTaskInstance1...EndJoinDataGraph
MultiTaskDefn (MTD)InputPortListInOutPortListOutInPortListOutputPortListTaskInstanceListTaskGraph
© CBL/NCSU All Rights Reserved
Page 17 of 61
Y_taskPrimitives-b
Tosuccessor
tasksFrompredecessor
tasksBBCdata
BBCdata
Black-Boxcomponent
FSMDtask
config.data
BBCdata
BBC
BBCdata
Reset
BF,CFBegin Fork,Control Fork
DM
DataMux
EJ,CJ
End Join,Control Join
BBC data
flowData/localData
© CBL/NCSU All Rights Reserved
Page 18 of 61
Y_taskArchitecture
To Nsuccessor
tasks
From Mpredecessor
tasks
flowData/localData
taskconfig.
data
FSMDInvokeAbortSkip
WaitingEnabledXecuting
C ompletedDone
AbortedT imedOut
Skipped
BBCor
WBC
completion status
invocationsignal
CFCJ
DM
Reset
M
M
MM
M
N
N
Efi
CIi
Fi
Li
COi
DOutDIn
© CBL/NCSU All Rights Reserved
Page 19 of 61
XML Schema Specification for MTD<!-- type declaration of multi task definition --><xsd:complexType name ="MultiTaskDefn " content="elementOnly"> <xsd:sequence minOccurs=" 0" maxOccurs=" 1"> <xsd:element name ="Title" type ="Title"/> <xsd:element name ="Description " type ="Description"/> <xsd:element name ="InputList" type ="InputList"/> <xsd:element name ="InoutList " type ="InoutList"/> <xsd:element name ="OutputList " type ="OutputList"/> <xsd:element name ="TaskList " type ="TaskList"/> <xsd:element name ="ControlGraph "> <xsd:complexType content="textOnly"> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name ="name "> <xsd:simpleType base="xsd:string"/> </xsd:attribute></xsd:complexType>
© CBL/NCSU All Rights Reserved
Page 20 of 61
XML Editor for Taskflow Construction
An XMLspy editor validates taskflow during construction itself
© CBL/NCSU All Rights Reserved
Page 21 of 61
Y_taskFlowSchedulingEngine
XMLTaskflows
Tcl-xmlParser
ValidateTaskflow Specs
Display TaskflowTree, Graph
TaskflowScheduler
EvaluateControlJoin
Enable Task
Execute BBCor expand WBC
EvaluateControlFork
Foreachchild task
Begin
False
False
No moretasks
Noop
Noop
End
TaskflowScheduler
© CBL/NCSU All Rights Reserved
Page 22 of 61
A Demo with Two Simple Tasks (single pSolver)
Demos
• hierarchical task tree/graph views
• taskflow simulation execution
• taskflow local data execution
• edit data represented by data I/O nodes
• taskflow flow data execution
Descriptions
BlackBox
© CBL/NCSU All Rights Reserved
Page 23 of 61
parabola_main.ctd<Cdtml>
<MainTask> <TaskList> <Begin/> <Task instance="(parabola)" \ taskRef="parabola_defn.cdt#task_parabola"/> <End/> </TaskList> <TaskGraph> (BEGIN) => (parabola) => (END) </TaskGraph>
<TaskInstance instance="(parabola)"> <SetInput port="mInDescrA1"> <LocalValue> pbInDescrA1.d </LocalValue> </SetInput> <SetInput port="mInitCost"> <LocalValue> 1e6 </LocalValue> </SetInput> <SetOutput port="mOutReport"> <LocalValue> parabola.rpt </LocalValue> </SetOutput> </TaskInstance></MainTask>
</Cdtml>
© CBL/NCSU All Rights Reserved
Page 24 of 61
parabola_defn.ctd
<TaskList> <Begin/> <Task instance="(InitA1)" taskRef="parabola_defn.cdt#pInitSolver"/> <Task instance="(A1)" taskRef="parabola_defn.cdt#pSolver"/> <End/> </TaskList> <TaskGraph> (BEGIN) => (InitA1) => (A1) => (END) (A1) => (A1) </TaskGraph>
<MultiTaskDefn name="task_parabola" \ bodyRef="parabola_body.cdt#task_parabola"> <InputList> <Input port="mInDescrA1" type="persistent"> <Title> Input description for task A </Title> </Input> <Input port="mInitCost" type="temporary"> <Title> Initial cost (should be very large) </Title> </Input> </InputList> <OutputList> <Output port="mOutReport" type="persistent"> <Title> Output report of parabola cost function evaluation </Title> </Output> </OutputList>
Note the backedge(self-loop)
© CBL/NCSU All Rights Reserved
Page 25 of 61
parabola_body.ctd (1)
<MultiTaskBody name="task_parabola" sleep=""> <BeginFork/>
<TaskInstance instance="(A1)" maxIterate="10" host="h1"> <DataMux> <SetInput port="inpDescr"> <LocalValue> taskA1_inpDescr.d </LocalValue> </SetInput> <SetInput port="initCost"> <LocalValue> 1.e6 </LocalValue> </SetInput> <SetInput port="initSoln"> <LocalValue> 5 </LocalValue> </SetInput> <SetOutIn port="newCost"> <LocalValue> taskA1_newCost.d </LocalValue> </SetOutIn> <SetOutIn port="newSoln"> <LocalValue> taskA1_newSoln.d </LocalValue> </SetOutIn> <SetOutput port="nIter"> <LocalValue> taskA1_nIter.d </LocalValue> </SetOutput>
(A1)pSolver
© CBL/NCSU All Rights Reserved
Page 26 of 61
parabola_body.ctd (2)
<SetOutput port="oldCost"> <LocalValue> taskA_oldCost.d </LocalValue> </SetOutput> </DataMux> <RepeatCondition> <UserRepeat> evalRepeatCondition \ "[cdtReadData newCost]" IsLessThan "[cdtReadData oldCost]" </UserRepeat> </RepeatCondition> </TaskInstance>
<SingleTaskBody name="pSolver" sleep=""> <ExecCommand type="TclCmd"> <Value> pSolver.tcl "[cdtGetData inpDescr]" "[cdtGetData initCost]" \ "[cdtGetData initSoln]" "[cdtGetData newSoln]" \ "[cdtGetData newCost]" "[cdtGetData nIter]" \ "[cdtGetData oldCost]" </Value> </ExecCommand></SingleTaskBody>
© CBL/NCSU All Rights Reserved
Page 27 of 61
Single Parabola Demo Outline
-- introduce hierarchical task tree and graph views turn off/on control edges
-- introduce taskflow simulation modeenter 1 second wait/task (random variable otherwise. 0--5 seconds)execute taskflow with all edges turned on
-- introduce taskflow local data executionprobe data nodes for data values expected by task (initA1)probe data I/O nodes for data values assigned to task (A1)
(not all data is present yet)turn off all edges except (initA1) -> (A1)click on (initA1), continue clicking on (A1) until “minimum” is declaredprobe data I/O nodes for data values assigned to task (A1)
-- edit data represented by data I/O nodesclick on pbInDescrA1.d an edit contents (but don’t) save
-- introduce taskflow flow data execution (here, we get the same results)make sure all edges are connected, reset and clean all dataclick on (Begin)probe data I/O nodes for data values assigned to task (A1)
© CBL/NCSU All Rights Reserved
Page 28 of 61
A Demo with Concurrent Task Executions
(A2)pSolver
(A3)pSolver
(END)(B)pEval(BEGIN) (C)
pReport
(A1)pSolver
see the 2-out-3 synchronizationpattern in ..._body.cdt (next page)
A1, A2, A3 should executeconcurrently
if on different hosts
© CBL/NCSU All Rights Reserved
Page 29 of 61
......._main.ctd<MainTask> <TaskList> <Begin/> <Task instance="(parabola)" taskRef="parabola_defn.cdt#task_parabola"/> <End/> </TaskList> <TaskGraph> (BEGIN) => (parabola) => (END) </TaskGraph>
<TaskInstance instance="(parabola)"> <SetInput port="mInDescrA1"> <LocalValue> pbInDescrA1.d </LocalValue> </SetInput> <SetInput port="mInDescrA2"> <LocalValue> pbInDescrA2.d </LocalValue> </SetInput> <SetInput port="mInDescrA3"> <LocalValue> pbInDescrA3.d </LocalValue> </SetInput> <SetInput port="mInitCost"> <LocalValue> 1e6 </LocalValue> </SetInput> <SetOutput port="mOutReport"> <LocalValue> parabola.rpt </LocalValue> </SetOutput> </TaskInstance></MainTask>
© CBL/NCSU All Rights Reserved
Page 30 of 61
......._defn.ctd
<TaskList> <Begin/> <Task instance="(InitA1)" taskRef="parabola_defn.cdt#pInitSolver"/> <Task instance="(InitA2)" taskRef="parabola_defn.cdt#pInitSolver"/> <Task instance="(InitA3)" taskRef="parabola_defn.cdt#pInitSolver"/> <Task instance="(A1)" taskRef="parabola_defn.cdt#pSolver"/> <Task instance="(A2)" taskRef="parabola_defn.cdt#pSolver"/> <Task instance="(A3)" taskRef="parabola_defn.cdt#pSolver"/> <Task instance="(B)" taskRef="parabola_defn.cdt#pEvaluator"/> <Task instance="(C)" taskRef="parabola_defn.cdt#pReport"/> <End/> </TaskList> <TaskGraph> (BEGIN) => (InitA1) => (A1) => (B) => (C) => (END) (A1) => (A1) (BEGIN) => (InitA2) => (A2) => (B) => (C) => (END) (A2) => (A2) (BEGIN) => (InitA3) => (A3) => (B) => (C) => (END) (A3) => (A3) </TaskGraph></MultiTaskDefn>
© CBL/NCSU All Rights Reserved
Page 31 of 61
......._body.ctd <TaskInstance instance="(B)"> <JoinCondition> <UserInvoke> evalJoinCondition MINIMUM 2 \ {(A1) Valid} {(A2) Valid} {(A3) Valid} </UserInvoke>
••••••••••••••••••••••••••••••••
<SetOutput port="costAvg"> <LocalValue> taskB_costAvg.d </LocalValue> </SetOutput> <SetOutput port="count"> <LocalValue> taskB_count.d </LocalValue> </SetOutput> </DataMux> </TaskInstance>
<DataGraph> mInDescrA1 -> (A1).inpDescr mInDescrA2 -> (A2).inpDescr mInDescrA3 -> (A3).inpDescr mInitCost -> (A1).initCost mInitCost -> (A2).initCost mInitCost -> (A3).initCost (A1).newCost -> (B).costA1 (A2).newCost -> (B).costA2 (A3).newCost -> (B).costA3 (B).totalCost -> (C).totalCost (B).costAvg -> (C).costAvg (B).count -> (C).count (C).outReport -> mOutReport </DataGraph></MultiTaskBody>
2-out-of-3synchronization
pattern
© CBL/NCSU All Rights Reserved
Page 32 of 61
Concurrent Executions Demo Outline-- taskflow simulation mode
click “exec checkboxes” so that tasks B anb C are always executed ...do task (A1) by repetitive clicks (with repeat-edge off)do task (A3) single node with repeat-edge onwhen (A3) is completed task (B) should fire (regardless of (A2) state)enter 2 seconds of sleep/task, do the entire taskflow, blocking one edge (watch the concurrent 3-task execution)modify source file to have tasks A1, A2, A3 executed on single host (forcing a serial execution of the three tasks)
-- taskflow local data executionturn-off all edges to (B)check for input data and lack of output datado tasks (A1), (A2), and (A3) concurrently check that now we have input data for (B) but not yet (C)click on (B) which invokes (C)
-- taskflow flow data executionconnect the entire flowcheck for input data and lack of output datado tasks (A1), (A2), and (A3) concurrently check that now we have input data for (B) but not yet (C)click on (B) which invokes (C)connect the entire flow and re-execute to get final results in a single click ....
© CBL/NCSU All Rights Reserved
Page 33 of 61
TaskFlow Architecture
• Task Primitives• Task Primitives Encapsulation• Task Primitives Instances• TaskFlow Graph Model • Two State One Task Example (in hardware)• Four State One Task Example (in hardware)• Task Architecture• Task FSMD• TaskFlow Views TaskFlow Scheduling Engine
© CBL/NCSU All Rights Reserved
Page 34 of 61
Y_taskPrimitives-a
control port for task invocation (input)
control port for task execution status (output)
control port for task abort (input/output)
port for temporary/persistent data (input/output/inout)
port for temporary/persistent data pair (input/output/inout)
port for temporary/persistent data stack (input/output/inout)
port for temporary/persistent data pair stack (input/output/inout)temporary/persistent datatemporary/persistent data stack
control abort connector (port-port, opened/closed by user)control invocation connector (port-port, opened/closed by user)control invocation connector (port-port, always closed)data connector (data-port, port-data or port-port)
© CBL/NCSU All Rights Reserved
Page 35 of 61
Y_taskPrimitives-b
Tosuccessor
tasksFrompredecessor
tasksBBCdata
BBCdata
Black-Boxcomponent
FSMDtask
config.data
BBCdata
BBC
BBCdata
Reset
BF,CFBegin Fork,Control Fork
DM
DataMux
EJ,CJ
End Join,Control Join
BBC data
flowData/localData
© CBL/NCSU All Rights Reserved
Page 36 of 61
Y_taskPrimitivesEncap-a
BBC
BBCdata
ResetFSMDtask
config.data
WBCdata
WBC
WBCdata
ResetEncapsulated WBC
Invoke/Abort
ResetFSMDtask
config.data
BBCdata
BBC
BBCdata
ResetEncapsulated BBC
Invoke/Abort
© CBL/NCSU All Rights Reserved
Page 37 of 61
Y_taskPrimitivesEncap-b
WBC (White-Box Component)
TaskInstance1
TaskInstance2 TaskInstance3
EJBF
© CBL/NCSU All Rights Reserved
Page 38 of 61
Y_taskPrimitivesInstance-c
Frompredecessor
tasks
user
CF
ResetFSMDtask
config.data
BBCor
WBCdata
BBCor
WBC
Reset
Dout
DMflowData/localData
CJ
Din (local)
Din (flow)
Task Instance
Tosuccessor
tasks
userEncap. BBC/WBC
© CBL/NCSU All Rights Reserved
Page 39 of 61
Y_taskFlowGraphModel-a
For each user invocation,
for each user abort edge,
there is a corresponding
program invocation and
program abort edge.
Frompredecessor
tasks
F/L
user
user
Din (local)
Din (flow)
Taskinstance
k
Tosuccessor
tasks
user
Dout
R ... user reset of task X ... user invocation of taskA ... user abort of task S ... user skip of task F/L ... user task data select
AXR S
© CBL/NCSU All Rights Reserved
Page 40 of 61
Y_taskFlowGraphModel-b
T1
T2 T3Din Dout
BF EJ
© CBL/NCSU All Rights Reserved
Page 41 of 61
S QR Q
SyncBBC
act com
done
reset
enable
clock
y
Y_2stateOneTaskExample (in hardware)
S QR Q
BBC
act com
reset
enable doney
© CBL/NCSU All Rights Reserved
Page 42 of 61
Y_4stateOneTaskExample (in hardware)
QX
QC
QD
Pi
R
S QR Q
S QR Q
y1
y2
pulse gen.
counteri > Imax OR
cost(i) > cost(i-1)
YESNO
tdtr tc
X/W
C/X
X/C
D/C
BBC
© CBL/NCSU All Rights Reserved
Page 43 of 61
Y_taskArchitecture
To Nsuccessor
tasks
From Mpredecessor
tasks
flowData/localData
taskconfig.
data
FSMDInvokeAbortSkip
WaitingEnabledXecuting
C ompletedDone
AbortedT imedOut
Skipped
BBCor
WBC
completion status
invocationsignal
CFCJ
DM
Reset
M
M
MM
M
N
N
Efi
CIi
Fi
Li
COi
DOutDIn
© CBL/NCSU All Rights Reserved
Page 44 of 61
Y_taskFSMD
Finite State Machine(as per FSM transition table)
Datapath(as per datapath table)
R
BBCor
WBC
completion status
invocationsignal
DoutDin
taskconfig.data
{ Pi , Pa , Ps }
{ QE , QX ,
....,QS }
• • • • • •
© CBL/NCSU All Rights Reserved
Page 45 of 61
Y_taskFlowViews1-a
- (taskFlowInstance1 - InputList
• mIn1 = “fileIn1.t”• mIn2 = “fileIn2.t”
- OutputList• mOut1 = “fileOut1.r”
- TaskList• (Begin) |x|- (TaskA) |o|x|
+ InputList+ OutputList+ TaskList
- (TaskB) |x|+ InputList+ OutputList
+ (TaskC) |o|x|• (End)
} single task
} multi task
invoke task
open graphView
XO
© CBL/NCSU All Rights Reserved
Page 46 of 61
Y_taskFlowViews1-b
(TaskA)
(TaskC) (End)(Begin)
(TaskB)
hierarchical task
primitive task
user-controllededge
Execute task by clicking the “task button” Abort task by clicking the “flashing task button”
token holder states:• white (task not yet executed)• yellow (task “aborted” )• green (task “executing” )• blue (task forkCondition is “valid”)• violet (task forkCondition is “invalid”)• pink (task “timed-out” )• red (task “aborted” )
mIn1 = “fileIn1.t”
© CBL/NCSU All Rights Reserved
Page 47 of 61
Y_taskFlowSchedulingEngine
XMLTaskflows
Tcl-xmlParser
ValidateTaskflow Specs
Display TaskflowTree, Graph
TaskflowScheduler
EvaluateControlJoin
Enable Task
Execute BBCor expand WBC
EvaluateControlFork
Foreachchild task
Begin
False
False
No moretasks
Noop
Noop
End
TaskflowScheduler
© CBL/NCSU All Rights Reserved
Page 48 of 61
Collaborative Computing with Taskflows
- Asynchronous Collaboration
- Synchronous Collaboration
- Asynchronous and Synchronous Collaboration
- Web-Interface to Taskflow Environment
© CBL/NCSU All Rights Reserved
Page 49 of 61
Asynchronous Collaboration: Task and Data Ownership
Ownership assignment to tasks- Input and output data inherit ownership of task
Shared data at ownership boundries (conflict)- Use read/write locks to resolve conflicts- Add `buffer’ task with dual ownership
Two users U1 and U2- U1(A), U1(B)- U2(C), U2(D)
A D
SharedData
U1 U1
B
U2 U2
C
© CBL/NCSU All Rights Reserved
Page 50 of 61
Asynchronous Collaboration: Ownership Locking
A D
SharedDataU1
BU2
C
A D
SharedData
U1
B
U2
C
readlock(C-read)writelock(B-write)
readlock(B-write)writelock(C-read)
AsynchronousGroup Server
(AGS)
© CBL/NCSU All Rights Reserved
Page 51 of 61
Asynchronous Collaboration: Buffer Task
A
U1
B
MutualConsent
AsynchronousGroup Server
(AGS)
DU2
CB-C
U1+U2
A
U1
B D
U2
CB-C
U1+U2
© CBL/NCSU All Rights Reserved
Page 52 of 61
Synchronous Collaboration: GroupKit Vs VNC
U1 U2
CentralizedVNC Server
DistributedGroupKit Client
DistributedGroupKit Client
CompressedPixel Image
Selective DataSynchronization
© CBL/NCSU All Rights Reserved
Page 53 of 61
Synchronous Collaboration Architecture
U1 U2
Selective DisplaySynchronization
SynchronousGroup Server
(SGS)
SynchronousGroup Client (SGC)
SynchronousGroup Client (SGC)
© CBL/NCSU All Rights Reserved
Page 54 of 61
Asynchronous and Synchronous Collaboration: OmniDesk
A
U1
B
MutualConsent
DU2
CB-C
U1+U2
A
U1
B D
U2
CB-C
U1+U2
OmniDesk(AGS+SGS)
OmniFlow+ SGC
OmniFlow+ SGC
© CBL/NCSU All Rights Reserved
Page 55 of 61
Web-Interface for the Environment
Web-browsers are here to stay (for a while anyway ...)
Questions:
• Can we use a web-browser for our environment?
Features expected (at least):
• hierarchy of windows
• no tedious installation
• access to file system, printing
• security of applets
© CBL/NCSU All Rights Reserved
Page 56 of 61
Tcl-Plugin: Restrictions and Solutions
Restrictions of Tcl-plugin code:
• no auto_load mechanism
• partial set of Tk widgets
• no standard input/output
Current coding techniques for Tcl-plugins:
• merge all tcl application scripts into a single file
• require each client to install the application package
• (re-)design the application GUI to contain a single window
• use an appropriate security policy
© CBL/NCSU All Rights Reserved
Page 57 of 61
WebWiseTclTk Architecture
TcletScripts
WebWiseTclTkToolkit
Web ServerHosting Tclets Tclet
home policyClient Host
Web Browser
Tcl-Plugin
Downloads the toolkit as well as the tclet scripts from the web server
© CBL/NCSU All Rights Reserved
Page 58 of 61
Implementation of a ‘toplevel’ Window Using Frames
Menubar
Frame correspondingto toplevel window
Resize window in bothdirections simultaneously
Kill Window Title Iconify Maximize
Resize window in vertical direction
Resize window in vertical direction
Resize window inhorizontal direction
© CBL/NCSU All Rights Reserved
Page 59 of 61
Example: TkWidget Demos
© CBL/NCSU All Rights Reserved
Page 60 of 61
Evaluation of WebWiseTclTk using TkWidget Demos
Category Scripts Action events Pass Fail DiagButtons, . . . 8 23 (1+4+3+5+2+4+1+3) 22 1Listboxes 3 10 (3+4+3) 9 1Entries 3 15 (6+7+2) 15Text 5 16 (3+3+2+6+2) 15 1Canvases 7 20 (4+2+5+3+2+2+2) 17 3Scales 2 2 (1+1) 2Menus 2 11 (5+6) 9 2Dialogs 3 4 (1+2+1) 0 4Miscellaneous 3 3 (1+1+1) 2 1 0Total 36 104 91 5 8
© CBL/NCSU All Rights Reserved
Page 61 of 61
Conclusion and SummaryKey contributions of this work:
• a taskflow architecture to support concurrency• a highly interactive GUI-based taskflow design and execution environment• support for task ownership during asynchronous collaboration• rendering collaboration-unaware tcl-applications collaborative• web-accessibility of standalone tcl-applications
Benefits: • scalability: large user-configurable programs can be composed from
existing legacy programs for network-transparent cross-platform execution.• flexibility to control standalone execution of subtasks.• flexibility to decompose any computing project into a hierachy of tasks,
-- bind the tasks and data to taskflow instances, -- delegate the subtasks to distributed team members,-- support asynchronous and synchronized execution policies.
Future work: • extended formalization of the control/data taskflow model.• optimize resource utilization and perform load balancing.