每月新增 20,000 个持久工作流实例的 WF 性能

发布于 2024-07-18 06:38:53 字数 737 浏览 3 评论 0原文

Windows Workflow Foundation 在进行 WF 实例持久化时存在速度缓慢的问题。 我计划做一个项目,其业务层将基于 WF 公开的 WCF 服务。 该项目每月将创建 20,000 个新工作流实例,每个实例可能需要长达 2 个月的时间才能完成。 我相信,由于性能原因,在执行持久性时,如果 WF 变慢,我的给定问题将是无法实现的。 我有以下问题:

  1. 这是真的吗? 在这样的负载下我的性能会很差吗(考虑到 WF 持久速度限制)
  2. 我该如何解决这个问题?

目前我们有两种可能的解决方案: 1. 每个新的业务流程请求(例如,给我一个新的驾驶执照)将是一个新的 WF 实例,并且通过将所有状态请求操作转发到单独数据库中保存的状态值来限制持久性操作的数量。 2. 通过将每个工作流程分段分解为单独的工作流程并让该工作流程处理每个业务流程请求,在任何给定时间仅启动少量工作流程实例,而没有任何持久性(仅在系统崩溃等情况下)系统中当前步骤的实例(例如,我正在提交我的驾驶执照申请表,这是第一步......我们有 100 个案例,我的第一步工作流程将同时处理每个案例)。

我对这个问题的解决方案非常感兴趣。 如果您想讨论该问题,请随时给我发邮件:[电子邮件受保护]

Windows Workflow Foundation has a problem that is slow when doing WF instances persistace.
I'm planning to do a project whose bussiness layer will be based on WF exposed WCF services. The project will have 20,000 new workflow instances created each month, each instance could take up to 2 months to finish.
What I was lead to belive that given WF slownes when doing peristance my given problem would be unattainable given performance reasons.
I have the following questions:

  1. Is this true? Will my performance be crap with that load(given WF persitance speed limitations)
  2. How can I solve the problem?

We currently have two possible solutions:
1. Each new buisiness process request(e.g. Give me a new drivers license) will be a new WF instance, and the number of persistance operations will be limited by forwarding all status request operations to saved state values in a separate database.
2. Have only a small amount of Workflow Instances up at any give time, without any persistance ofso ever(only in case of system crashes etc.), by breaking each workflow stap in to a separate worklof and that workflow handling each business process request instance in the system that is at that current step(e.g. I'm submitting my driver license reques form, which is step one... we have 100 cases of that, and my step one workflow will handle every case simultaneusly).

I'm very insterested in solution for that problem. If you want to discuss that problem pleas be free to mail me at [email protected]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

眼前雾蒙蒙 2024-07-25 06:38:53

水合执行 wokflow 的数量将由环境因素、内存服务器吞吐量等决定。持久性问题实际上只有在您一直加载和卸载工作流程(即实时)时才会发挥作用,在这种情况下,工作流程可能不是最好的解决方案。

The number of hydrated executing wokflows will be determined by environmental factors memory server through put etc. Persistence issue really only come into play if you are loading and unloading workflows all the time aka real(ish) time in that case workflow may not be the best solution.

北城孤痞 2024-07-25 06:38:53

在我当前的项目中,我们也坚持使用 WF。 我们没有完全相同的数量(可能约为 2000 个实例/月),并且它们通常不需要那么长的时间来完成(它们通常在 5 分钟内完成,在某些情况下需要几天)。 我们确实决定将主要工作流程分为两部分,即正常的等待状态。 我不能说我注意到系统因此有任何性能差异,但它确实简化了它,因为我们的系统有时在将传入信号与正确的工作流实例匹配时出现问题(这是我们代码中的问题;而不是在WF)。

我认为,如果我要开始一个基于 WF 的新项目,我宁愿选择按顺序调用的较小工作流程,也不愿让大型工作流程处理整个流程。

In my current project we also use WF with persistence. We don't have quite the same volume (perhaps ~2000 instances/month), and they are usually not as long to complete (they are normally done within 5 minutes, in some cases a few days). We did decide to split up the main workflow in two parts, where the normal waiting state would be. I can't say that I have noticed any performance difference in the system due to this, but it did simplify it, since our system sometimes had problems matching incoming signals to the correct workflow instance (that was an issue in our code; not in WF).

I think that if I were to start a new project based on WF I would rather go for smaller workflows that are invoked in sequence, than to have big workflows handling the full process.

晌融 2024-07-25 06:38:53

说实话我还在研究工作流基础的性能特点。

不过,如果有帮助的话,我听说 WF 团队在新版本的 WF 4 中进行了许多性能改进。

这里有一些链接可能会有所帮助(如果您还没有看到它们)

.NET 4 中的 Windows Workflow Foundation (WF) 开发人员简介(讨论性能改进)

Windows Workflow Foundation 的性能特征(适用于 WF 3.0)

To be honest I am still investigating the performance characteristics of workflow foundation.

However if it helps, I have heard the WF team have made many performance improvements with the new release of WF 4.

Here are a couple of links that might help (if you havn't seem them already)

A Developer's Introduction to Windows Workflow Foundation (WF) in .NET 4 (discusses performance improvements)

Performance Characteristics of Windows Workflow Foundation (applies to WF 3.0)

心凉 2024-07-25 06:38:53

3.5 上的 WF 存在性能问题。 WF4 则不然——每月 20000 个 WF 实例不算什么。 如果你按分钟说话我会担心的。

WF on 3.5 had a performance problem. WF4 does not - 20000 WF instances per month is nothing. If you were talking per minute I'd be worried.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文