[
https://issues.jboss.org/browse/DROOLS-2284?page=com.atlassian.jira.plugi...
]
Mario Fusco commented on DROOLS-2284:
-------------------------------------
The purpose of the executable model is to provide a pure Java-based representation of a
rules set, together with a convenient Java DSL to programmatically create such a model.
This model is generic enough to be independent from Drools but can be compiled into a
plain Drools knowledge base. For this reason the implementation of the executable model
has been split in 2 subprojects:
# *drools-canonical-model* is the canonical representation of a rule set model which is
totally independent from Drools
# *drools-model-compiler* compile the canonical model into Drools internal data structures
making it executable by the engine
The introduction of the executable model brings a set of benefits in different areas:
* *Compile time*: in Drools 6 a kjar contained, together with some pregenerated classes
implementing the constraints and the consequences, the list of drl files and other Drools
artifacts defining the rule base. Those drl files needed to be parsed and compiled from
scratch, when the kjar is downloaded from the maven repository and installed in a
KieContainer, making this process quite slow especially for large rules sets. Conversely
it is now possible to package inside the kjar the Java classes implementing the executable
model of the project rule base and recreate the KieContainer and its KieBases out of it in
a much faster way. The kie-maven-plugin automatically generated the executable model
classes from the drl files during the compilation process.
* *Runtime*: in the executable model all constraints are defined as Java lambda
expressions. The same lambdas are also used for constraints evaluation and this allowed to
get rid of both mvel for interpreted evaluation and of the jitting process transforming
the mvel-based constraints in bytecode, resulting in a slow warming up process.
* *Future research*: the executable model will be also an enabler for experimenting with
new features of the rule engine without the need of encoding these features in drl format
and modify the parser to support them.
Implement an executable model for drools and a java dsl to instance
it
----------------------------------------------------------------------
Key: DROOLS-2284
URL:
https://issues.jboss.org/browse/DROOLS-2284
Project: Drools
Issue Type: Bug
Components: core engine
Reporter: Mario Fusco
Assignee: Mario Fusco
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)