Skip to content

Put the "flow" into "workflow graph" #82

Closed

Description

@jrandall

The text in section 3.5 (https://common-workflow-language.github.io/draft-2/#workflow_graph) is written in such a way as to suggest that streaming is not possible:

When there is a dependency, the workflow engine must execute the dependency process and wait for it to successfully produce output before executing the dependent process.

Perhaps we could simply change "successfully produce output" to "start producing output"?

It may be that some implementations support named pipe streams (when Input/Output objects are streamable=True) in which case dependent processes can block until their input is ready, or that some implementations implement some form of process pipelining even when streamable=False (e.g. by implementing the streaming under the filesystem layer). In these instances, it is not necessary to wait for the dependency process to complete producing output before executing dependent processes, but I'm not sure if it is necessary to add this level of detail to the specification.

However, it isn't strictly necessary for an implementation to wait until some output starts to be produced - actually it may be an optimisation that they could proactively start dependent processes before any input data is ready (as long as it can force them to block on input).

Perhaps the simplest thing is for the entire "when there is a dependency..." line to be removed.

Activity

  1. mr-c commented on Oct 26, 2015

    @mr-c
    Member

    @jrandall Thank you for the thoughtful question. Do you feel we have addressed your concern in Draft 3?

  2. jrandall commented on Oct 28, 2015

    @jrandall
    MemberAuthor

    I think it is still somewhat unclear in draft 3 (http://common-workflow-language.github.io/draft-3/#Workflow_graph):

    A workflow describes a set of steps and the dependencies between those processes. When a process produces output that will be consumed by a second process, the first process is a dependency of the second process. When there is a dependency, the workflow engine must execute the dependency process and wait for it to successfully produce output before executing the dependent process. If two processes are defined in the workflow graph that are not directly or indirectly dependent, these processes are independent, and may execute in any order or execute concurrently. A workflow is complete when all steps have been executed
    

    I would suggest re-wording the "dependency process" - I think using that terminology is inherently confusing as it is not in common usage in English - I would suggest "prerequisite process" as a more clear counterpoint to the "dependent process".

    It may also be worth adding a parenthetical specifically regarding streaming.

    Perhaps something like:

    A workflow describes a set of steps and the dependencies between those processes. 
    
    When a process produces output that will be consumed by a second process, the first process is a dependency (prerequisite) of the second process. When there is a dependency between processes, the workflow engine must execute the prerequisite process and wait for it to successfully produce output before executing the dependent process (in case both processes are streamable, it may be sufficient for the workflow engine to arrange for a stream endpoint to block until input data is ready). 
    
    If two processes are defined in the workflow graph that are not directly or indirectly dependent, these processes are independent, and may execute in any order or execute concurrently. A workflow is complete when all steps have been executed. 
    
  3. added this to the milestone on Feb 16, 2016
  4. removed this from the milestone on Jun 14, 2016
  5. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions