简体   繁体   中英

Framework to execute long running tasks

Are there any frameworks available in java or .NET to execute long running tasks? This framework should give me the flexibility to plug in my implementation to execute the job and also ability to control the run-time like the number of tasks that execute and load balancing of execution.

I would like to here different approaches to solve the problem.

在Java中,您可以根据需要尝试使用Java 5 Executor框架, Spring BatchQuartz

Windows Workflow Foundation might work for you in .NET depending on what exactly you mean by "Long Running Task". It has the capability of recording the task's state and restoring it at a later time, allowing the task to survive a reboot or other interuption.

In Java: ThreadPoolExecutor offers you a thread pool and lets you execute tasks in it. It also offers means to determine current active tasks, number of already executed tasks etc.

TaskParallelLibrary in .Net 4.0 has facility to work with parallel, asynchronous and long-running tasks. See http://msdn.microsoft.com/en-us/library/dd460717.aspx

In .Net for "long running tasks" it would be Windows Workflow Foundation . And for "ability to control the run-time like the number of tasks that execute and load balancing of execution" it would be Task Parallel Library . You might need to evaluate your problem statement and see if either one of these or combination of both of these frameworks can solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM