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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:57:21+00:00 2026-05-18T00:57:21+00:00

I have a .NET function that does some complex calculation. Depending on the parameters

  • 0

I have a .NET function that does some complex calculation. Depending on the parameters that are passed in, the function:

  • Takes anywhere from several minutes to several hours to run
  • Uses 100% of a single core during the computation
  • Requires anywhere from 100s of MB to several GB of memory
  • Writes anywhere from several MB to several GB of data to disk
  • May throw an exception, including an OutOfMemoryException

The amount to data to be written to disk can be accurately predicted from the function parameterisation. There is no easy way to predict the other resource requirements from the function parameterisation.

I need to expose this function via a web service. This service needs to be:

  • Resiliant and gracefully report any problems during the calculation
  • Capable of handling concurrent requests, as long as there are sufficient resources to handle the request without significant performance degradation, and to gracefully deny the request otherwise.

I’m intending to handle the long-running nature by having the initial request return a status resource that can be polled for progress. Once the calculation is complete this resource will provide the location of the output data, which the client can download (probably via FTP).

I’m less clear on how best to handle the other requirements. I’m considering some sort of “calculation pool” that maintains instances of the calculator and keeps track of which ones are currently being used, but I haven’t figured out the details.

Does anyone with experience of similar situations have any suggestions? As long as the solution can run on a Windows box, all technology options can be considered.

  • 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-18T00:57:22+00:00Added an answer on May 18, 2026 at 12:57 am

    I’d suggest splitting your application in two parts.

    1. The web service itself. It’s functionality:
      • Get a work item from a client;
      • Transfer this work to a backend service that performs the actual work;
      • Report progress and the result;
    2. The backend service. It’s functionality:
      • Process the requests friom the web service;
      • Perform the actual computation.

    The reasons for this design are
    1) it’s relatively difficult to handle the workload in the hosted application (ASP.NET) because the server (IIS) will manage the resources, while in a separate app you have more direct control;
    2) two-tier design is more scalable – for instance, later you could easily move the backend to another physical machine (or several machines).

    The web service should be stateless – for instance, after a request is accepted, the user gets back some ID and uses this ID to poll the service for the result.

    The backend server, probably, has to maintain a queue of the requests to process and a set of worker threads that process them. The workers should monitor the resources available and take care not to overload the machine (and, of course, gracefully handle all possible error conditions).

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

Sidebar

Related Questions

Does .NET have some type of built in function that allows filtering on Gridviews?
I have a simple javascript (JQuery based) method that does some css magic to
I have an asp.net button, that when clicked calls a code behind function. The
I have a syntax highlighting function in vb.net. I use regular expressions to match
In .net we are not allowed to have shared function/methods in abstract classes and
If I have .Net Form with a component/object such as a textbox that I
Does .net have a way to determine whether the local filesystem is case-sensitive?
I have a .NET webforms front end that allows admin users to upload two
I have a .NET 2.0 application that has recently had contributions that are Service
I have created dll in C# 3.5 which does some memory intensive matrix calculations

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.