To echo both Bobby Priambodo and Michael Herman (I sense a trend here of collaboration), definitely look at a worker queue system, but also an asynchronous way of letting the user retrieve their data later. There’s no guarantee as you scale that pushing work onto a queue, waiting for a worker to wake up, take the task, process it, and send data back, will all happen within an “acceptable” amount of time for a user to handle this in real-time.
As you scale, add timers on everything your stack does, and use that data to estimate for the user how long they could likely wait based on the amount of processing already in the pipeline, how big their request is, average times to process that quantity of that kind of work, etc.. It will be a much better user experience. Personally, I’d let the user know to “expect an email from us in 5 to 20 minutes” with a link to where they can download the response.
On the other hand, if you’re trying to build an app with “real-time processing” as a product feature, you have way bigger scalability issues to tackle.
- Tengo 22 años y estoy aprendiendo desarrollo web front-end. Debido a algunos problemas, no puedo trabajar en un trabajo regular. ¿Cómo puedo tener éxito en trabajar independientemente sin experiencia laboral?
- Estoy teniendo dificultades para implementar una tarifa recurrente. ¿Qué tengo que hacer?
- Descargué un tema de WordPress ahora quiero que sea mi propio sitio web. ¿Como lo puedo hacer?
- Estoy aprendiendo desarrollo web. ¿Qué otras buenas fuentes hay aparte de los libros de Jon Duckett?
- Todavía no he trabajado en Javascript, pero sé algunas cosas básicas en Javascript. Me gustaría aprender React JS, ¿puedo?