编排服务是否不适合实施工作流程? [英] Are orchestration services unfit to implement a workflow process?

查看:94
本文介绍了编排服务是否不适合实施工作流程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用nservicebus实现工作流程过程中,我遇到了一个问题,我使用版本2.0.1329.2,而我要实现的工作流程非常简单:

i'm facing with a problem during the implementation of a workflow process with nservicebus, i use version 2.0.1329.2 and the workflow i'm trying to implement is quite simple:

我有一个需要计算的文章列表,工作流程从发布的第一个列表开始.之后,用户可以进行其他发布,从原始列表中添加或删除某些文章.每个列表都有一个代码标识符.

I have a List of articles that need to be computed, the workflow starts with the first list published. After that the user can do other publish adding or deleting some articles from the original list. Every list has a code identifier.

我已经使用列表代码标识的编排服务实现了它.在传奇数据中,还列出了构成列表的所有文章参考.

I have implemented it using an orchestration service identified by the list's code. In the saga data there are also all references of the articles which the list is made of.

问题是:当用户发布项目列表时,而同一列表的另一次发布正在进行时,进程状态没有任何锁定,这样就没有并发控制,但是处理程序将完成以后将拥有自己的数据.

The issue is that: when user publish a list of articles while another publish of the same list is in progress there aren't any lock of the process state and in this way there are no concurrency control but the handler which will finish later will have its own data persisted.

例如:

  1. 包含10条要添加的文章的列表在时间[t]到达,业务流程服务从数据库加载传奇数据,在[t + 5]修改并存储它们
  2. 带有1个要添加的项的列表在时间[t + 1]到达,编排服务从数据库中加载传奇数据,然后在时间[t + 4]对其进行修改并存储

在[t + 6]时间,我应该添加6个元素,但是我只能添加5个元素..

at time [t+6] i should have 6 added elements but i get only 5 added elements ..

我认为行为应该是这样的:如果第二条消息与相同的列表相关,则应该找到进程状态,直到第一个完成为止.否则,如果与另一个列表相关,则应该并行处理.

I think the behavior should be like this: the second message if related to the same list should find the process state locked until the first finishes.. Otherwise if related to another list should be parallel processed.

为此,我想知道是否没有适当地编排服务以支持工作流流程实现,除非将工作线程的数量设置为仅一个会失去并行效率的线程.

For this i'm wondering if orchestration services aren't properly made to support a workflow process implementation unless setting the number of worker threads to only one losing the parallel efficiency though.

推荐答案

您正在使用非常旧的NServiceBus版本,应进行升级.自那以来,已修复了许多错误,以至于您真的不值得花时间来解决这些问题.

You're using a VERY old version of NServiceBus and should upgrade. So many bugs were fixed since then that it really isn't worth your time to try to deal with these issues.

这篇关于编排服务是否不适合实施工作流程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆