Description
In #5659 (and AEP 008), @sphuber added live-monitoring of calculation jobs - a feature allowing conditional termination of a job with optional data retrieval and storage as if the job finished normally. This was inspired by the work of @ramirezfranciscof as part of the Aurora project (automation of battery cycling experiments). It is clear now from its use in Aurora that there is an additional requirement of the monitoring feature, specifically to visualize data snapshots during cycling. Furthermore, there are requests from the weather and climate community, as part of the SwissTwins project, to monitor fresh data and conditionally trigger further calculations. These features may or may not be supported in the current iteration. It appears to me then that monitor actions should be connected to the provenance, or at least have the ability to be in case necessary.
In the case of Aurora, the monitor currently analyzes a snapshot (produced on the same interval as the monitor's polling frequency) and conditionally kills the cycling experiment if the battery capacity drops below a threshold. Aurora's users would like to visualize the analyzed data. Much of the analysis logic is the same applied on data produced at the end of the cycling calculation. So, it seems natural to convert snapshots into data nodes (via a calcfunction
?) and attach them to the monitored calculation. One thing to consider here is that perhaps only the most recent node is required at a time and should be discarded if the job completes normally.
In the case of SwissTwins, the monitor would need to trigger additional calculations/workflows. This one requires more thought. For instance, one would need to decide what would be the input to this new calculation. Perhaps this is another conditional on the fresh data.
I considered at least in the case of Aurora an alternative, where perhaps the snapshot is made available through other means. But I'm not entirely sure how this may work.
Input welcomed 🙏