...
A successful task (with a docker container as target) can be defined in different ways:
- Given , a result file with a specified format (Drawback: additional effort for data handling, error-prone due file formatting).
- Exit code of the docker container is equal to 0 ( = successful).
...
Exception handling through algorithm containers (e.g. invalid parameters, unreachable database, ...)
Approaches:
ID | Process | Exception Handling |
---|---|---|
1 | None. | None. |
2 | An algorithm continuously saves results which are deleted if an exception is
| While encountering an exception, clean up inconsistent |
3 | An algorithm persistently saves all or none results.
| Results are only saved if no exception was throws. |
...
Approaches (2) and (3) may result in inconsistent results if an algorithm saves result fragments and terminates immediately during a
superior exception (e.g. power failure). Therefore, each algorithm is responsible for saving (only) consistent results.
Note 2:
...
Idempotent Algorithm
Description:
Avoiding to run Avoid running an algorithm twice, which results are already available.
...
ID | Process |
---|---|
1 | Using Luigi's mechanism of idempotent algorithms (see preliminary). |
2 | Each algorithm is responsible for fulfilling the idempotent property by itself. Luigi's mechanism is omitted. Drawback: More complexer complex algorithms, error-prone due wrong implementations. |
Given the mechanism of idempotent tasks and the fact as we can verify an algorithm's exit code, Luigi could simply infer if an algorithm has to be
run or was already completed. A problem appears after restarting Luigi which discards all containers and there exit codes.
A recommended solution is to save all container's exit codes and standard streams (stdout/strerr) within Luigi's database. The solution supports
traceability for historical batch processes and provides Luigi a way to identify complete tasks.
...