Skip to content

Save parameters (in payload?) on process creation #780

@kr1zz

Description

@kr1zz

WASDI should automatically save the input of operations when the processWorkspace is created.

Saving the input in the payload from within the processor code is a best practice, however, this can only be done once the processor goes into the RUNNING state. This is a problem in this scenario:

  1. user A starts the process with input X
  2. user B checks (programmatically) if there's an ongoing run with input X

If the application is RUNNING, then user B could check if the input has been written in the payload. If the process is CREATED or WAITING (for the first time), then the application's code has not been executed yet, and user B won't find anything in the payload yet (actually, there is no payload yet).

What should user B do? Should they wait? But how do they now that the instance they see has been launched with input X?
This is particularly problematic if the application is slow (maybe because it is computationally intensive, as they often are): they may want to run multiple instances in parallel, with different inputs {X, Y, Z, ...}. In this scenario, how can they choose which one to launch? Waiting would be a waste of time, as would be launching multiple time the computation with the same input.

I suggest we create a field other than payload, maybe call it input, and save the params there automatically at creation. We should then add APIs and library methods to access this field (probably read-only, I'd say)

Metadata

Metadata

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions