I have an API call that takes a significant amount of time to compute the result. During the computation, users have to wait until the API responds, which leads to a poor user experience.
The calculation uses a parallel approach:
parallel for loop [1 ~ 100] parallel for loop [1 ~ 1000]
parallel for loop [1 ~ 100] parallel for loop [1 ~ 1000]
Is there a way to reduce the waiting time? Would using something like RabbitMQ or a similar message queue allow the task to run in the background and update the database once it's completed?