Skip to content

CPC workflow improvements

imanp edited this page Feb 4, 2015 · 3 revisions

List of requirements

Better separation of events in a function

  • input added
  • input updated
  • output set
  • cancel ?

Be able to see work in progress. For example the mdrun case where a simulation can run for days. We would like to see the intermediate result here.

Define what should run on server and worker in a simple way.

Much simpler process to define a new function.

See when something finished. Individual functions and the whole workflow

Much clearer module API

Auto logging (Track the whole workflow in a human readable format)

Example brainstorm of how a new function declaration should look like.

The aim of the new structure is to make it very simple to define a function block. xmls should be eliminated and everything should be self contained in one file. More advanced things should be possible to do with a clearer api and better separation between updates,adds and other features listed above

class myFunction: inputs [] // holds Value objects or something similar to it outputs [] // holds Value objects or something similar to it run_on_worker = False //Determines where the function or the executable should be run

// one of the 2 parameters below must be set. executable can be any binary. function is a pure python function
executable
function    
done = false

//When input or output is set it will trigger a call to a set function. This gives the user the possiblity to     hook into each event and execute arbitrary code if needed.

setMyInput(newValues):
   '''
   newValues is an array with all the new values that are set. User can then choose to iterate over only these.
   Still leaves the possibility to iterate over alla values by fetching the inputs property
   '''

   //user do what they want. After all updates the function or executable will be called.


commandFinished():
'''
might be needed if need to trigger something specific when a command is finished
'''