简体   繁体   English

执行长期运行任务的框架

[英]Framework to execute long running tasks

Are there any frameworks available in java or .NET to execute long running tasks? Java或.NET中是否有可用的框架来执行长时间运行的任务? 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". Windows Workflow Foundation可能会在.NET中为您工作,具体取决于您所说的“长时间运行的任务”。 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. 在Java中:ThreadPoolExecutor为您提供线程池,并允许您在其中执行任务。 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. .Net 4.0中的TaskParallelLibrary具有处理并行,异步和长时间运行任务的功能。 See http://msdn.microsoft.com/en-us/library/dd460717.aspx 请参阅http://msdn.microsoft.com/en-us/library/dd460717.aspx

In .Net for "long running tasks" it would be Windows Workflow Foundation . 在.Net中,“长期运行的任务”将是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 . 对于“能够像执行的任务数量和执行的负载平衡那样控制运行时的能力”,它应该是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. 您可能需要评估您的问题陈述,看看这些框架中的任何一个或这两个框架的组合是否都能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何执行长时间运行的任务? - How to execute long-running tasks? 播放运行长时间阻止任务的框架,而不会阻止客户端 - Play framework running long blocking tasks, without blocking the client Hot Completable 可用于长时间运行的任务 - Hot Completable with long running tasks 如果我的项目没有模块,但仍想在GAE(使用Java)的后端实例上运行,该如何执行长时间运行的任务? - How to execute long running tasks if I my project has no modules but still want to run on a the backend instance in GAE (Using Java)? Swing,Passive View和长时间运行的任务 - Swing, Passive View and Long running tasks Wicket:如何处理长时间运行的任务 - Wicket: how to handle long running tasks 长期运行的处理程序,计时器和任务有问题吗? - Issues with long running Handlers, Timers, and Tasks? 异步执行长时间运行的liquibase数据库更新 - Execute long running liquibase database updates asynchronously 长时间运行的CallableStatement无需等待即可执行 - long running CallableStatement execute without wait 消息驱动的Bean和超时中长时间运行的任务 - Long running tasks in message-driven beans and timeouts
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM