Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:18:14+00:00 2026-06-12T11:18:14+00:00

I would like to implement an (open source) web application, where the user sends

  • 0

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:
schematic problem description

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.

My questions, specifically:

  1. Which messaging technology should I apply between web app and worker backend?
    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?

  2. Which technology should I use for pushing information to the browser?
    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?

Big big thanks for your recommendations in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:18:15+00:00Added an answer on June 12, 2026 at 11:18 am

    To be of any use, your web application is going to have a database. I would create a table in that database that is specifically for these jobs. You’d have a ‘State’ for each job.

    This simplifies your system because you can just send off your request to start a job and hand it over to the backend workers (zmq is a good solution for this IMO). Since you’re using python for the back-end, it’s very trivial to get your worker jobs to either update its current working job in the database or have another ‘updater’ whose only job is updating fields in the database (keeping the logic separate will make for a better solution, allows you to possibly start up multiple ‘updater’ if you’re doing a lot of updating)

    Then for your frontend, since you do not want to poll the server, I’d do something of a ‘long poll’. What you’re essentially doing is polling the server but the server nevers actually ‘responds’ until there is a change in the data you’re interested in. As soon as there is a change, you respond with the request. At the frontend, you have your JS re-make the connection as soon as it recieves the latest update. This solution is cross-browser compliant so long as you use a JS framework that is cross-browser as well (I would suggest jQuery).


    To eliminate the web apps database polling, do the following:

    make the initial request a long poll request to the web app, The web app sends off a zmq message to your backend (probably would need to be done with a REQ/REP socket) and waits. It waits until it gets a message from the zmq backend with a state change. When it gets a state change it responds to the frontend with the change. At this point, the frontend will send out a new long-poll request (with this jobs current id which can be its identity) and the web app will reconnect to the backend and wait for another state change. The trick to make this work is to use ZMQ’s ZMQ_IDENTITY for the socket when it was originally created (in the first request). This will allow the web app to reconnect to the same backend socket and get new updates. When the backend has a new update to send, it will signal the web app which in turn will respond to the long-poll request with its state change. This way there is no polling, no backend database and everything is event driven from the backend workers.

    I’d setup some sort of watch-dog that if the frontend goes away (switches pages or closes browser), the backend sockets will be properly closed. No need for them to sit there indefintely blocking when it’s changed state.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to make a free open-source C++ application for both Linux and
I would like to implement a simple AR desktop application. This application should first
We would like to implement a web form that automatically saves content at regular
I would like to implement some Drag-select functionality into a project of mine but
I've developed an open source application in php and mysql. I'd like to give
I would like to implement a Plug-In framework for a C# application; such that
I need to implement a moderately simple Powerpoint-like tool for the web. The user
we would like to write a web based application to monitor the ATM machines
I would like to display a live video stream in a web browser. (Compatibility
I would like to display a live video stream in a web browser. (Compatibility

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.