for our project, we are using micro services with API gateway pattern. One of the features that the client do is to generate a report. Client, fills a form and uploads a file and our system will generate a report. We want to process the file and the form data, store the data in the database, then send all this data to the algorithm which eventually generates the reports.
We have one service that handles the database interactions: this service will be responsible from processing the form and saving to database and, the report generation involves 5 other services.
Our current consideration is to have the API gateway wait until the report generation is completed which doesn't sound right but I can't articulate why it "doesn't sound right". So, I need some help on this.
I believe a publisher subscriber pattern might be better but I'm not sure how errors are handled or how to keep track of the state of the report - also I need some insight on this area.
Please let me know if you need more information. I'll be very happy to discuss this further.
Thanks in advance