[JBoss JIRA] (DROOLS-2962) Incremental and Non-Incremental evaluation instead of sequential mode.
by Mark Proctor (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2962?page=com.atlassian.jira.plugi... ]
Mark Proctor updated DROOLS-2962:
---------------------------------
Description:
While Drools supports sequential mode at the engine configuration level. We should move this to a unit and rule level.
We should enhance this work too. Right now Drools evaluation is either fully incremental or non-incremental if the kbase is set to stateless.
Sequential mode current means two things.
1) Rules evaluate and fire in load order.
2) Rules are non-incremental.
By default now all rules are load order anyway. If we simply supported a @NonIncremental or @Incremental(NO) attribute on a unit, then it's behaviour would be the same as sequential is now, but scoped to the unit. I believe this is true, but I'd like this verified (challenged).
As with existence/data driven, this is the default for the unit's rules. A unit may override with the opposite configuration.
This means a unit can be mixed incremental and non-incremental.
Existence or Data Driven annotations for non-incremental do not make sense, and their combination should throw an error, as explained below.
Instead a non-incremental rule should have control on whether it is to be re-evaluated and fired, each time the unit is entered. At first glance this behaviour looks very similar to Existence Driven, however the choice not to allow @ExistenceDriven + @NonIncremetal is due to the lack of symmetry. You could not combined @DataDriven + @NonIncremental. That lack of symmetry may break intuitive learning, if it's not kept clean.
If an alternative annotation is introduced - such as @OneShot|@EvalAndFireOnce|etc. We should make sure it fits intuitively and cleanly with how we explain @ExistenceDriven. Potentially OneShot rules/units could utilise the shadow network and be removed from propagation after evaluation.
was:
While Drools supports sequential mode at the engine configuration level. We should move this to a unit and rule level.
We should enhance this work too. Right now Drools evaluation is either fully incremental or non-incremental if the kbase is set to stateless.
Sequential mode current means two things.
1) Rules evaluate and fire in load order.
2) Rules are non-incremental.
By default now all rules are load order anyway. If we simply supported a @NonIncremental or @Incremental(NO) attribute on a unit, then it's behaviour would be the same as sequential is now, but scoped to the unit. I believe this is true, but I'd like this verified (challenged).
As with existence/data driven, this is the default for the unit's rules. A unit may override with the opposite configuration.
This means a unit can be mixed incremental and non-incremental.
Existence or Data Driven annotations for non-incremental do not make sense, and their combination should throw an error, as explained below.
Instead a non-incremental rule should have control on whether it is to be re-evaluated and fired, each time the unit is entered. At first glance this behaviour looks very similar to Existence Driven, however the choice not to allow @ExistenceDriven + @NonIncremetal is due to the lack of symmetry. You could not combined @DataDriven + @NonIncremental. That lack of symmetry may break intuitive learning, if it's not kept clean.
If an alternative annotation is introduced - such as @OneShot|@EvalAndFireOnce|etc. We should make sure it fits intuitively and cleanly with how we explain @ExistenceDriven.
> Incremental and Non-Incremental evaluation instead of sequential mode.
> ----------------------------------------------------------------------
>
> Key: DROOLS-2962
> URL: https://issues.jboss.org/browse/DROOLS-2962
> Project: Drools
> Issue Type: Feature Request
> Reporter: Mark Proctor
> Assignee: Mario Fusco
> Labels: MDP_BRAINFARTS
>
> While Drools supports sequential mode at the engine configuration level. We should move this to a unit and rule level.
> We should enhance this work too. Right now Drools evaluation is either fully incremental or non-incremental if the kbase is set to stateless.
> Sequential mode current means two things.
> 1) Rules evaluate and fire in load order.
> 2) Rules are non-incremental.
> By default now all rules are load order anyway. If we simply supported a @NonIncremental or @Incremental(NO) attribute on a unit, then it's behaviour would be the same as sequential is now, but scoped to the unit. I believe this is true, but I'd like this verified (challenged).
> As with existence/data driven, this is the default for the unit's rules. A unit may override with the opposite configuration.
> This means a unit can be mixed incremental and non-incremental.
> Existence or Data Driven annotations for non-incremental do not make sense, and their combination should throw an error, as explained below.
> Instead a non-incremental rule should have control on whether it is to be re-evaluated and fired, each time the unit is entered. At first glance this behaviour looks very similar to Existence Driven, however the choice not to allow @ExistenceDriven + @NonIncremetal is due to the lack of symmetry. You could not combined @DataDriven + @NonIncremental. That lack of symmetry may break intuitive learning, if it's not kept clean.
> If an alternative annotation is introduced - such as @OneShot|@EvalAndFireOnce|etc. We should make sure it fits intuitively and cleanly with how we explain @ExistenceDriven. Potentially OneShot rules/units could utilise the shadow network and be removed from propagation after evaluation.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (DROOLS-2966) Collapse LIAN Segment
by Mark Proctor (JIRA)
Mark Proctor created DROOLS-2966:
------------------------------------
Summary: Collapse LIAN Segment
Key: DROOLS-2966
URL: https://issues.jboss.org/browse/DROOLS-2966
Project: Drools
Issue Type: Feature Request
Reporter: Mark Proctor
Assignee: Mario Fusco
The LIAN segmentation adds complexity to the segmentation and bitmask operations. It should be possible to collapse these, so they are no longer needed.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (DROOLS-2965) No beta nodes propagation optimisation
by Mark Proctor (JIRA)
Mark Proctor created DROOLS-2965:
------------------------------------
Summary: No beta nodes propagation optimisation
Key: DROOLS-2965
URL: https://issues.jboss.org/browse/DROOLS-2965
Project: Drools
Issue Type: Feature Request
Reporter: Mark Proctor
Assignee: Mario Fusco
Where a rule has no beta nodes and feeds directly into the RTN that propagation should be done at alpha network propagation time, and avoid populating any unnecessary staging lists.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (DROOLS-2964) Shadow Network
by Mark Proctor (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2964?page=com.atlassian.jira.plugi... ]
Mark Proctor commented on DROOLS-2964:
--------------------------------------
Right now the Rete network is fixed and globally part of the kbase, this does not allow for any rewriting.
Where re-writting might be desirable the ksession should create an on demand shadow kbase network. Once in place, it can do further rewriting.
For example if we know a rule will only fire once, we could remove it from the network traversal after first firing.
Or if we know a rule will not fire for some time, it could be removed from the network and scheduled to be added later.
> Shadow Network
> --------------
>
> Key: DROOLS-2964
> URL: https://issues.jboss.org/browse/DROOLS-2964
> Project: Drools
> Issue Type: Feature Request
> Reporter: Mark Proctor
> Assignee: Mario Fusco
> Labels: MDP_BRAINFARTS
>
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months
[JBoss JIRA] (DROOLS-2963) Compiled NonIncremental Rules
by Mark Proctor (JIRA)
Mark Proctor created DROOLS-2963:
------------------------------------
Summary: Compiled NonIncremental Rules
Key: DROOLS-2963
URL: https://issues.jboss.org/browse/DROOLS-2963
Project: Drools
Issue Type: Feature Request
Reporter: Mark Proctor
Assignee: Mario Fusco
The AlphaNetwork compiler approach can be used for NonIncremental rules, as they always evaluate from root to tip.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 10 months