I am developing an application where I am using messaging queue. The workflow is as shown below user submits a request --> request goes to the queue --> process the task --> show output to the user.
I am currently using Iron MQ and possibly Amazon SQS (depends on the performance) with Laravel PHP. I have been able to send the message to the queue but not able to display the output to the user. Am I missing something here? Do I need to write the output to the database/file then poll it continuously and then show the output to the user? Any help will be much appreciated
PS: Here the output is user specific and depends on the input. So every user will have unique output.
Generally messages are for background processing like Antonio said, but you can poll (or push using websockets) to get the results after the background process is completed. Basically anytime you see a progress bar or spinner on a website after you've clicked something, that is what's happening.
So the process is:
Here's a good article on various polling options: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery