--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/8402a644-e87f-413a-8eb0-c9b24c71ffa7%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/6de3fbc6-bbef-41a0-9398-3aced810c5fe%40googlegroups.com.
Scanner doesn't work?
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/6de3fbc6-bbef-41a0-9398-3aced810c5fe%40googlegroups.com.
Problem is not with the execution side. More the "compilation" side when i switch over to using the Executable Model. It still executes fine.The questions I have are maybe a little broader and for my own clarity rather than a problem:- The considerable time difference between not using (buildAll()) and using the ExecutableModel (buildAll(ExecutableModel.class)) - <20s vs. ~60s.
- Whether or not usage of a "executable model" is the same (i.e. get the container or kiebase and create the session from it vs. some other approach)?
- How does this align with Kogito or even Drools going forward? Is the way to go going to be the ExecutableModel?
- Resources, memory-wise, it does not seem to release when I use the ExecutableModel. Same exact process without it does - is this something I need to dig deeper into?
From my knowledge of drools:On Mon, Dec 16, 2019 at 9:56 PM KimJohn Quinn <k...@logicdrop.com> wrote:Problem is not with the execution side. More the "compilation" side when i switch over to using the Executable Model. It still executes fine.The questions I have are maybe a little broader and for my own clarity rather than a problem:- The considerable time difference between not using (buildAll()) and using the ExecutableModel (buildAll(ExecutableModel.class)) - <20s vs. ~60s.Compiled model contains compiled expressions only (no MVEL necessary) as lambda expressions. It's still need compiler to fully create KieBase in memory.
- Whether or not usage of a "executable model" is the same (i.e. get the container or kiebase and create the session from it vs. some other approach)?YES. Only conditions are precompiled to lambda expressions.
- How does this align with Kogito or even Drools going forward? Is the way to go going to be the ExecutableModel?I guess they are working on 'full' compilation. Rules than can be loaded without compiler.
- Resources, memory-wise, it does not seem to release when I use the ExecutableModel. Same exact process without it does - is this something I need to dig deeper into?I'm (re)loading rules via InternalKieModule and using StatelessSession. Rules are garbage collected and memory released. I have special testCase for this for our DroolsService.
/Pavel
We have a KieBase, with about 4k rules and a few custom types, that is built off of a spreadsheet into a single DRL file now. The rules are relatively simple, basic constraints and consequences.
...
It seems the time to "compile" is much longer. About 60s vs. <20s and the JAR size is about 6MB vs. 1.5MB (I can understand this).
Questions:1) Is this expected that the compile time would take considerably longer? We are going from the DRL to the new lambda functions.
2) Is usage of the model similar? Create a session from a container or kiebase and fire it?
3) Once I "compile" the KJAR can I manually load it into the filesystem and use it from there still (I ask this because I am confused how Kogito does it)?
4) In trying to line up for using the Executable Model, and potentially Kogito, is it better to work directly off the KieBase instead of the KieContainer going forward?
5) We use custom classloaders in the build (above is a test snippet) and container creation, this "released" resources a little nicer according to the profiler and MAT. The same approach does not apply with the executable model? It does not look to be release any resources. Where usually we sit around 20k classes loaded I now show about 115k (could be me but just wondering since I can reliably run the same scenario without the new model and see the lower resource usage).
That works if I am compiling the KJar upfront and including it with the application. In my case, rules can be modified and compiled at runtime on a node and pushed to the repository (they may be for completely different domains). Then, for execution, which is on handled by a different node, they are pulled from the repository, loaded, and executed.
- Whether or not usage of a "executable model" is the same (i.e. get the container or kiebase and create the session from it vs. some other approach)?YES. Only conditions are precompiled to lambda expressions.This seem to work for me. Only issue I had was with a property that had a collection inside the mody(){} block.
File kjarFile = ....
ReleaseId kieRelease = new ReleaseId("aaa", "bbbb", "vvvv"); // Use real GroupId and ArtifactId of your KJAR, version (vvvv) is ignored ;-)
InternalKieModule kieModule = InternalKieModule.createKieModule(kieRelease, kjarFile);
KieProject kProject = new KieModuleKieProject(kieModule, kieModule.getModuleClassLoader());
kProject.init();
return new KieContainerImpl("RULESXXX", kProject, KieRepositoryImpl.INSTANCE, kieRelease);
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/CAFRyLGibZqAUTG0o5vZC1nD21XU5NuCUbraKkqy032peX9H7aA%40mail.gmail.com.