vendredi 13 août 2021

Pipeline Design Pattern with restart feature

I have to perform a sequence of steps.

  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5

My current implementation:
If there is a failure in Step 3, the pipeline will fail. I have a restart program that will start the process from Step 1.

Expectation:
But I don't want step 1 and step 2 to be repeated again. I have a backup of the result of step 2 in DB which is the input for step 3. My restart program can pass this to Step 3 as input. Restart from where it failed.

Which design pattern will be best for this scenario? I'm currently using pipeline design pattern.

Programming Language Used: Java

Aucun commentaire:

Enregistrer un commentaire