If I have want to handle client requests using a web server, messaging queue and x N worker processes, what are the usual patterns?
What I can think of are:
Worker take the job from queue, process it, save the result for client to poll. So there is no communication between the web server and worker
Worker take the job from queue, process it, send it to a result queue, which will be consumed by the web server(how to do this with express?), then web server sends it back to client. Meanwhile client will be waiting (is this still called a long polling?)
Web server return a response immediately, push the job to worker queue. Worker take the job from queue, process it, send it to a result queue, which will be consumed by the web server, then web server send it to clients via websocket. In this case the client doesn't have to.
Which of these are mostly common used? Or are there better solutions?