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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:42:33+00:00 2026-05-27T07:42:33+00:00

We are sending in instruction sets from a browser into a multi-tier web app

  • 0

We are sending in instruction sets from a browser into a multi-tier web app using jquery-ajax. The first component (component A, written in C#) validates and persists the instructions into a database, and then calls the second component (component B, written in Java and also called via HTTP) which operates on the instructions after retrieving them from the same database. The browser client just polls the rdbms table via component A after submitting the job, so it is effectively disconnected after sending in the request and doesn’t wait for a response from component A.

What is the best way for the middle-tier (component A) to return a success message to the client acknowledging a successful submission of the task, but then still make the request to the task handler (component B) and releasing all of its resources? Returning a response is a final action for the page so we’d have to do something in another thread before sending this back to the browser.

Another option we have considered is for this to happen in component B where the task handler sends back an immediate response to the middle tier acknowledging the request, but then continues on working in the background. The only difference would be where we spawn the additional thread to do the work.

Any good ideas on how to handle this?

  • 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-05-27T07:42:33+00:00Added an answer on May 27, 2026 at 7:42 am

    What we have done in situations like this is:

    • Browser send instruction set to component A
    • Component A validates instruction set
    • Component A save instruction set to DB under new “tracking” ID STATUS=PENDING
    • Component make request to component B to do the work
    • “Threading” is in component B:
      • Component B starts background thread to do the work, first thing background thread does is update status of “tracking ID” to STATUS=RUNNING
      • Component B main thread returns to success to component A
    • Component A gets “started successfully” message from component B, so returns its own “started successfully” message back to the browser along with the “tracking ID”. At this stage component A is done with the request, all component A resources are free.
    • Browser can make different call to component A to check status of “tracking ID” in the DB
    • Meanwhile the background “thread” of component B is still doing the work, possibly recording progress against the “tracking ID”
    • Component B completes work, updates status of “tracking ID” in DB, STATUS=OK or STATUS=ERROR and gives up all resources.

    The advantage of all that is there is no waiting for the work to finish from you application’s point of view. The actual work is done by a “background” thread, just as if you kicked it off with nohup dothework & in a shell. The key is using the DB to monitor the status of the “tracking ID”.

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

Sidebar

Related Questions

Sending a message from the Unix command line using mail TO_ADDR results in an
Sending request to action using Ajax, the result type is json. Use a json
We are building an iPhone chat application. When sending from the browser to the
sending mail along with embedded image using asp.net I have already used following but
M sending the parameters from the jsp page, the code is <s:url id=url action=searchAction>
When sending data via POST or GET with jQuery you use for format {
When sending email using the SMTPClient class in ASP.NET C#, how can I add
I'm looking into sending regular automated text-messages to a list of subscribed users. Having
I've just found out that a spammer is sending email from our domain name,
We are having trouble getting Spring Security/Kerberos/AD to work for our web app. Our

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.