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 7887075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:29:10+00:00 2026-06-03T05:29:10+00:00

In my application, the client can request a complex task that could take 1-2

  • 0

In my application, the client can request a complex task that could take 1-2 minute to complete. The task runs in a separated thread and the request handler communicates with it via a BlockingQueue.

Currently, the sever immediately redirects the client to a waiting page which polls the server every 10 seconds. However, this is quite inefficient and the client may have to wait for an extra 10s if the task finished right after a poll.

What I would like to do is to allow the request handler (for the waiting page) to be blocked until the task is done and only then write the response to the user. Based on my observations, most browsers will use a longer timeout if the server accepted the TCP socket (and maybe has written back some header??), but I am not sure about the exact timeout across different browsers.

Is it realistic to make the browser wait for 2 minutes? Does anyone has any experience on this or better ideas?

  • 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-03T05:29:11+00:00Added an answer on June 3, 2026 at 5:29 am

    Have you thought about Push Notification.

    What you have currently in place is Pull notification where you poll server for response.

    In pull server will let you know when response is ready, Its called comet aka reverse ajax.

    In this case your browser doesn’t need to wait anymore, you can proceed with other work and once response is ready, present it to the user.

    Yes browser can be made to wait, just dont write the response.

    To explain, when you submit the work and then instead of redirecting to a different page, dont commit the response, instead start the server processing and once done submit the response. And in the UI you show processing message so that user knows task submitted is under process.

    IMHO I don’t feel this will be any good, as It will make your application appear as if it can handle only one request at a time, If that’s acceptable then no issues, though given today’s technology, almost everyone wants to do more in less time.

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

Sidebar

Related Questions

I need to make a nodejs client application that can send a POST request
In a client-server application how can the server know that a request comes from
The MAPISendMail function is available on windows so that an application can request that
How can I detect at the startup of the application that a client doesn't
In our client/server application, a user can log in using a username/password. The server
I'm currently developing a client/server application in Java and i can't make up my
How can I get a client's address from a WCF Service Application? Also, is
I have developed a web application and various clients can store records to that
I have client application that uses WCF service to insert some data to backend
Writing a client application that sends images to a server via a webservice. As

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.