populse / capsul

Collaborative Analysis Platform : Simple, Unifying, Lean
Other
7 stars 14 forks source link

Build a new API for Workflows #228

Closed sapetnioc closed 2 years ago

sapetnioc commented 2 years ago

We should define a backend agnostic Workflow structure that would be produced by Capsul given an executable, an engine and an execution context (i.e. a configuration of the engine for the given executable). This workflow structure would be given to an execution backend that would have to start jobs and wait for some jobs termination to start other jobs. A first implementation of such an execution backend could be easily done using Soma-Workflow. In this issue, we have also to define the communication API between Capsul and the execution backend.

A workflow would be composed of:

denisri commented 2 years ago

Is it really a need for a "new" API ? Or a matter of picking an existing one and using this one ? There are already a number of existing APIs around (as you have already looked at it), and soma-workflow has his one which suits our needs, even if no other did the job. So I'm not sure we need to reinvent the wheel once more ?

sapetnioc commented 2 years ago

This is the idea I presented in a meeting weeks ago. To be able to use soma-workflow or other existing engines, we need to decide what input to give to the workflow engine. Not all engines have the same features but some features of soma-workflow such as temporary files management are already managed by Capsul context. Therefore we can rely on a set of workflow features common to all engines. But we must define how we will create an engine specific workflow using the new API. In other words how to create a workflow (either Soma-workflow or other) given an executable, a Capsul engine and an execution context.