JBoss Drools是否真的并行执行所有规则? [英] Does JBoss Drools really execute all rules in parallel?

查看:466
本文介绍了JBoss Drools是否真的并行执行所有规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了很多有关JBoss Drools的文档,但是无法找到关于所有规则是否同时被执行(肯定是同时被触发)的明确答案.更具体地说,对于单个输入和一个说1000条规则的规则集,在每个规则中执行"when"条件和"then"条件,一个接一个地执行,或者同时并行执行.

I've read a lot of documentation of JBoss Drools but cannot find a definitive answer as to if all rules are executed concurrently (certainly they are fired concurrently). More specifically, for a single input and a rule set of say 1000 rules, do the "when" conditions and the "then" conditions in each rule, execute sequentially one by one, or in parallel at the same time.

在一方面RETE算法意味着并行性,当然当选择节点被折叠.但是,在优化节点之后,评估是按顺序进行的吗?并且beta内存和连接节点看起来应该同时执行,但是对吗?

On the one hand the rete algorithm implies parallelism, certainly when the select nodes are collapsed. However after the nodes are optimized is the evaluation sequential? And the beta memory and join nodes look like they should be executed concurrently, but are they?

此外,Drools文档还提到了顺序模式",它说默认情况下是关闭的.那么,什么是打开的并行模式?还有一个maxThreads选项表示线程化.

Also, Drools documentation speaks of "sequential mode", saying this is turned off by default. So what is turned on, parallel mode? And there is a maxThreads option implying threading.

另一方面,有人告诉我该代码不利用线程,因此可以并发评估,但大多数情况下是按顺序执行.

On the other hand, I was told that the code does not utilize threading and so evaluates concurrently but executes, on the most part sequentially.

有没有人看过任何证明这一情况的文件?

Has anyone seen any documentation that prooves the case either way?

谢谢!

推荐答案

标准rete算法中没有并行性的迹象.冲突集是由匹配的规则产生的,然后议程将应用一种策略,依次触发这些规则.

There is no indication of parallelism in the standard rete algorithm. A conflict set is produced of matched rules, the agenda then applies a strategy for firing those rules in turn.

多年来,在匹配或射击阶段,已经做了很多工作来使网状部分平行化.

Over the years a number of efforts have been done to parallelise part(s) of the rete, either during the matching or firing stages.

并行触发所有规则时的一个大问题是确定性执行.

A big problem when firing all rules in parallel is determinstic execution.

我们目前正在Drools中探索各种用于并行和并行匹配的策略.我们也将探索并发规则触发,但是我们需要找到更健壮的方式让用户指出哪些可以并行触发,哪些不能并行触发.这样用户就可以在需要的地方执行确定的执行.

We are currently exploring various strategies to concurrent and parallel matching, in Drools. We will explore concurrent rule firing too, but we need to find more robust ways for users to indicate what can be fired in parallel and what can't; so that the user gets deterministic execution where they need it.

这篇关于JBoss Drools是否真的并行执行所有规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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