We are currently developing an image processing restful api. Server performs some CPU-heavy computations image processing upon request and return the image to the client.
We want to make this a single http request (all computation should be done).
What is the best workflow for this. With speed has an high factor.
Other alternatives suggest using a Master/Worker Server workflow. But will mean multiple requests (first to put job in queue, others to poll if job is done). We want to make it a one trip request. How can we achieve this?
The single request would most definitely take some time how do we handle timeouts
One more thing, we are using NodeJS.