long-running-processes

Appropriate solution for long running computations in Azure App Service and .NET Core 3.1?

青春壹個敷衍的年華 提交于 2021-02-07 01:27:23
问题 What is an appropriate solution for long running computations in Azure App Service and .NET Core 3.1 in an application that has no need for a database and no IO to anything outside of this application ? It is a computation task. Specifically, the following is unreliable and needs a solution. [Route("service")] [HttpPost] public Outbound Post(Inbound inbound) { Debug.Assert(inbound.Message.Equals("Hello server.")); Outbound outbound = new Outbound(); long Billion = 1000000000; for (long i = 0;

Appropriate solution for long running computations in Azure App Service and .NET Core 3.1?

*爱你&永不变心* 提交于 2021-02-07 01:24:40
问题 What is an appropriate solution for long running computations in Azure App Service and .NET Core 3.1 in an application that has no need for a database and no IO to anything outside of this application ? It is a computation task. Specifically, the following is unreliable and needs a solution. [Route("service")] [HttpPost] public Outbound Post(Inbound inbound) { Debug.Assert(inbound.Message.Equals("Hello server.")); Outbound outbound = new Outbound(); long Billion = 1000000000; for (long i = 0;

What is correct way to combine long-running tasks with async / await pattern?

假如想象 提交于 2020-06-10 02:20:48
问题 I have a "High-Precision" timer class that I need to be able to be start, stop & pause / resume. To do this, I'm tying together a couple of different examples I found on the internet, but I'm not sure if I'm using Tasks with asnyc / await correctly. Here is my relevant code: //based on http://haukcode.wordpress.com/2013/01/29/high-precision-timer-in-netc/ public class HighPrecisionTimer : IDisposable { Task _task; CancellationTokenSource _cancelSource; //based on http://blogs.msdn.com/b

Resource optimization/utilization in EMR for long running job and multiple small running jobs

家住魔仙堡 提交于 2020-05-16 06:04:11
问题 My use-case: We have a long running Spark job. Here after called, LRJ . This job runs once in a week. We have multiple small running jobs that can come at any time. These jobs has high priority than the long running job. To address this, we created YARN queues as below: Created YARN Queues for resource management. Configured Q1 queue for long running job and Q2 queue for small running jobs. Config: Q1 : capacity = 50% and it can go upto 100% capacity on CORE nodes = 50% and maximum 100% Q2 :

How to run long-lasting process asynchronously under asp.net?

*爱你&永不变心* 提交于 2020-01-29 07:30:25
问题 .net 4.5, asp.net mvc: What is the best way to run long-lasting process (1-2 minutes) from ASP.NET application giving it should be run in a single-threaded environment, I mean the process is initiated for one user at a time only, executions for all other users have to wait till the current execution is done? The scenario is the following: user clicks button that run some sort of long-lasting calculations, http response returned to the user immediately, then user has to request status of the

why query is taking too long

陌路散爱 提交于 2020-01-17 06:41:50
问题 I have a query that should return around 10000 rows. The db itself is very large. I have run a simple query and it returned a result in less than 3 seconds. But when a more complex code it takes way too long. In my code I have done a nested select and a case statement. However, when I run my code it takes over an hour to return a result. What can I do to the code that would decrease this execution time. SELECT ticker_symb, day_sum_eff, cusip, clos_prc, nclos_prc, case when clos_prc is null

How can I execute a long running process in VBA without making pc crawl?

拈花ヽ惹草 提交于 2020-01-14 03:25:07
问题 I have a VBA application that creates an instance of a COM object and then continuously polls the objects DataReady property to see if there is new data. When new data is available it sticks the data into a spread sheet. The problem is this macro (vba sub routine) continually runs and this slows down excel to a crawl and makes the computer somewhat unusable while the process is running. Is there a way that I can start this process on a separate thread or do something like a .NET background

Keep background service running after killing an application

天大地大妈咪最大 提交于 2019-12-22 01:08:10
问题 I have developed an android application which runs background service, I need the service to stay alive even if the application is killed by user or for some reason. I have implemented the service and add return START_STICKY in onStartCommand method like this: public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); Log.d("my_state","On start command"); return START_STICKY; } also I defined the service in AndroidManifest.xml like this:

Launching a long-running background task - from ASP.NET or a scheduled job

大兔子大兔子 提交于 2019-12-21 20:59:40
问题 I have a fairly long-running process (several minutes) that I need to run roughly once a month - but not on a fixed schedule, but after a user clicks Go in a ASP.NET Webforms GUI page. Since ASP.NET really isn't designed to handle long-running background tasks, my idea was to put this into a separate console app. But how to launch that as needed? What happens if I use Process.Start(....) from my ASP.NET page's code-behind? I would like to avoid blocking the whole Web UI for 20 minutes or so..

Best practice for processing a lot of data while the user waits (in Rails)?

╄→гoц情女王★ 提交于 2019-12-21 17:19:38
问题 I have a bookmarklet that, when used, submits all of the URLs on the current browser page to a Rails 3 app for processing. Behind the scenes I'm using Typhoeus to check that each URL returns a 2XX status code. Currently I initiate this process via an AJAX request to the Rails server and simply wait while it processes and returns the results. For a small set, this is very quick, but when the number of URLs is quite large, the user can be waiting for up to, say, 10-15 seconds. I've considered