title: Job processing via web application: real-time status updates and backend messaging
body: <p>I would like to implement an (open source) web application, where the user sends some kind of request via his browser to a Python web application. The request data is used to define and submit some kind of heavy computing job. Computing jobs are outsourced to a "worker backend" (also Python). During job processing, the job goes through different stages over time (from "submitted" over intermediate states to "finished", ideally). What I would like to accomplish is to display the current job state to the user in real time. This means that the worker backend has to communicate job states back to the web application. The web application then has to push information to the user's browser. I've brought a picture for you that schematically describes the basic idea:
  <img src="https://i.stack.imgur.com/iV3VW.png" alt="schematic problem description"> </p>
  
  <p>The numbers in red circles indicate the chronological order of events. "web app" and "worker backend" are still to be designed. Now, I would be grateful when you can help me with some technology decisions.</p>
  
  <p>My questions, specifically:</p>
  
  <ol>
  <li><p><strong>Which messaging technology should I apply between web app and worker backend?</strong>
  When the worker backend emits a signal (a message of some kind) about a certain job, it must trigger some event in the web application. Hence, I need some kind of callback that is associated with the client that initially has requested job submission. I think I need some pub/sub mechanism here, where the worker backend publishes and the web app subscribes. When the web app receives a message, it reacts on it by sending a status update to the client. I want the worker backend to be scalable and strongly decoupled from the web application. Hence, I was thinking about using Redis or ZeroMQ for this task. What do you think? Is my whole approach a bit too complicated? </p></li>
  <li><p><strong>Which technology should I use for pushing information to the browser?</strong>
  Just out of perfectionism I'd like to have real-time updates. I do not want to poll with a high frequency. I want immediate push to the client when the worker backend emits a message :-). Also, I do not need maximum browser support. This project first of all is more or less a techdemo for myself. Should I go for HTML5 server-sent events / websockets? Or would you recommend otherwise?</p></li>
  </ol>
  
  <p>Big big thanks for your recommendations in advance.</p>