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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:51:53+00:00 2026-05-26T07:51:53+00:00

The Problem Once upon a time, I wrote an internal application to read data

  • 0

The Problem

Once upon a time, I wrote an internal application to read data from an internal database, and then take that data and POST it to a web service. The application is very simple, using a single thread and synchronous HTTP requests.

The scope of this application has now changed and it is trying to push far more data than it was ever intended to push. If it reads 1,000 records from our internal database, it will wrap them all into a single HTTP POST, putting a heavy CPU burden on the servers that host the web service that is receiving the data. Problems also arise when the web service encounters an error while processing one of the records in the POST. The XML response does not specify which specific record failed, so I have limited visibility into the success of my request.

How I’d Like to Fix It

I am going to re-design my application to be more reliable and more considerate of the servers hosting the web service. Specifically, I’d like to have a worker that collects records from the internal database every 15 minutes and turns them into jobs. These jobs would be serialized and stored in a queue (a database table, perhaps). I’d then like to have my application process the queue using several worker threads (is this a good idea?). A thread would pop a job out of the queue and process it by making an asynchronous HTTP POST to the web service up-stream. Depending on the status of the request, the job would result in a SUCCESS, FAILURE, TIMEOUT or ABORTED. The job would be updated in the database, the process would be logged and then the worker thread would move on to the next job, becoming idle if the job queue was empty.

I’m not an architect, so I don’t know the best way to implement something like this. Here are some specific questions I have on the design.

  • I’ve read some negative things about multi-threading in a .NET MVC environment. Should I avoid using multiple threads since I’m not doing anything that’s really CPU intensive?
  • Quartz.NET looks like it could do a lot of cool things. Should I be looking at using Quartz.NET for something like this?
  • Is my design reasonable? If not, how could it be improved?
  • How would you design a system to meet the goals of the new application?

I know this is a broad question, but I hope I’ve outlined my objectives clearly. Thank you 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-05-26T07:51:54+00:00Added an answer on May 26, 2026 at 7:51 am

    Have you considered MSMQ for this? You push the messages on the queue, read one every N minutes and have redundancy built in if any power failures occur etc. If you’re on a load balanced environment you can post to a shared queue.

    In response the questions:

    I’ve read some negative things about multi-threading in a .NET MVC environment. Should I avoid using multiple threads since I’m not doing anything that’s really CPU intensive?
    You’re advised not to use ThreadPools in ASP.NET so the same will apply for MVC. It can throttle your application.

    Quartz.NET looks like it could do a lot of cool things. Should I be looking at using Quartz.NET for something like this?
    This is a replacement for scheduling rather than queues, akin to cronjobs.

    Is my design reasonable? If not, how could it be improved?
    The serialization part sounds great, the SUCCESS, FAILURE, TIMEOUT or ABORTED part sound good. As mentioned, MSMQ will save you the hastle of writing redundancy and a message queue system.

    How would you design a system to meet the goals of the new application?
    A service, that reads from a message queue every so often and performs the action you want it to do. You could also look into SQL Server Message Broker as an alternative to MSMQ. MSMQ doesn’t have very good built in tools to manage it, so you would need to build on top of it. However it has an entire .NET assembly in the framework built in for using it.

    As you’re using .NET 4 you can also benefit from parallel tasks in place of manual thread management of the HTTP sending part of your system.

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

Sidebar

Related Questions

Once upon a time, there was a file in my project that I would
My problem is that I can only seem to click the button once, if
I'm using Entity Framework in my project, and I have the problem that, once
Problem: I have an address field from an Access database which has been converted
Once upon a time, I had a 'DEV' configuration and a 'Web.DEV.config' transformation file
I've stumbled upon a problem, that can be summarized as follows: When I create
Once upon a time, I had a DropDownList with Options built using this code:
I have an event that triggers upon a treeview node click, this then creates
Today at work, I stumbled upon a problem that was driving me nuts. Basically
The Holy Grail of programming is to solve a problem once and make continual

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.