I have worked in a few applications where parallel execution is required to perform some computing tasks. The main advantage of this approach is that you get the desired output pretty quickly, depending on the sub-threads that you create. This can be achieved in multiple ways using different technologies. However, the challenge with these approaches is that, if something goes wrong in the middle of the sub-thread, it's not easy to self-heal and resume from where it stopped. I'm sure many of you might have faced similar problems in your application, as it is a very common business case.
In this recipe, we will implement a simple way of executing a function in parallel with multiple instances by using Durable Functions.
Let's assume that we have five customers (whose IDs are 1, 2, 3, 4, and 5...