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:
- User submits a request (clicks a button or performs some action)
- A message is put on a queue (IronMQ in your case) for processing and a response is returned to the user immediately so user doesn't have to wait for processing.
- The page that is displayed to the user will start polling to check if the task is complete and will generally have some indicator that something is happening (progress bar or spinner or "please wait while processing").
- Worker process picks up the message and processes it.
- When finished, the worker stores results in a data store (cache, database, s3, etc)
- Page that is polling will know that the task is complete by checking the data store and then display the results.
Here's a good article on various polling options: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery