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

  • Home
  • SEARCH
  • 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 8502681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:33:10+00:00 2026-06-11T01:33:10+00:00

I have an interesting problem that I need to solve and I have no

  • 0

I have an interesting problem that I need to solve and I have no clue where to even start. I am writing an MVC web application that take a list of records via a form and will make an ajax call for each. The controller that the ajax call hits uses a resource that can only process one request at a time. The simple solution is to change the ajax calls to synchronous, however, that hangs the browser and gives a poor experience.

Also, it is possible that multiple users might use this app concurrently so queuing on the client side will not work.

Anyone have any suggestions?

Mike

  • 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-11T01:33:11+00:00Added an answer on June 11, 2026 at 1:33 am

    Well first off, my requirements are not quite the same as yours. My problem was that my backend database tends to be a little slow, and user responsiveness was extremely important.

    Therefore, I had to remove the database interaction from the equation.

    My solution has two main parts:

    1. Maintain a server side cache of the data

    2. Create a separate process to contain all database work that can interact with the server

    The separate process was implemented as a named pipe WCF service hosted by a windows service.

    The basic process overview is:

    1. User clicks “Save”, Ajax post the form to an Mvc controller
    2. The controller updates the cache data, then invokes the WCF pipe
    3. The service pushes the data into a concurrent queue (along with a session ID), and returns a guid token
    4. The controller returns the token as a JSON response.
    5. jQuery Ajax handler intercepts the response and saves the token into a UI element that 6. represents the “Saved” form.

    The service itself works like this:

    1. On start create a timer.
    2. On Timer tick:
    3. Stop the timer.
    4. Remove all queued work items from the concurrent queue
    5. Send each item to be processed by the work processor
    6. Add the item to the “Completed”, or “Has an Error” concurrent dictionaries, keyed by the earlier session Id (along with some time keeping stuff to eliminate stale data). This includes the original work token.
    7. Start the timer again.

    Back in user land, there is a javascript setInterval loop running:

    1. Ajax request to the server (Heartbeat controller)
    2. The controller connects to the service, and passes the current session id
    3. The service returns all items from the “Completed” and “Error” dictionaries
    4. The controller returns the lists as JSON object arrays
    5. The javascript loops through the returned lists and uses the tokens to do appropriate UI updates

    The end result is a very responsive UI despite the slow backend persistence server.

    If you want any specific portions of implementation code let me know.

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

Sidebar

Related Questions

I have an interesting SQL problem that I need help with. Here is the
I have an interesting genetics problem that I would like to solve in native
I have an interesting problem to solve here that may require some creative direction.
I am trying to solve an interesting problem. I have a table that has,
I have an interesting problem that I need help with. I am currently working
I have an interesting problem. The basis of the problem is that my last
We have an interesting problem with WCF binding and streaming transfer mode that we
I have an interesting problem, which is a function that returns a Dictionary<String,HashSet<String>> .
I have an interesting problem here I've been trying to solve for the last
I have an interesting problem being reported to me from an android application I

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.