Memory issue with drools (using 10000 rules)
by Shebs, Liron
Hello All,
I'm working at HP Software R&D and we are considering using drools in our product.
Benchmarking tests showed that running 10,000 rules consumes 382mb.
This is too high for our system requirements, and we would like to know how we can improve it.
Technical details:
- Drools version: 5.1 with default configuration.
- All rules look like this:
rule "status-Fixed-Open"
when
event : FieldChangedEvent(fieldName == "status", oldValue == "Fixed");
entity : Entity(entityType == "mock-entity");
eval(((String) entity.getFieldValue("status")).equals("Open"));
then
do Something...
end
- Loading code:
KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
for(all resources)
{
knowledgeBuilder.add(resource, ResourceType.DRL);
}
knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());
Any insights are most appreciated.
Thank You,
Liron, HP Software R&D
15 years, 3 months
Hot deployment in Drools
by Sumeet Karawal
Hi,
I have some queries about Drools - Guvnor :
1) Is hot deployment possible in Guvnor, how can we do that? How can we
change rules on fly? eg we are using Decision Table for rules and if we
change some data in that sheet, how will the changes get reflected in the
rule engine?
2) Does the rule engine maintain a log file (in expert as well as in
Guvnor). How to do an Audit check eg. for getting which rules were fired,
which user changed the rules and at what time?
Thanks & Regards,
Sumeet Karawal
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
15 years, 3 months
Sequential mode and partial propagations
by Vincent LEGENDRE
Hi All
First : sorry for the misplaced reply to another thread
This post is to continue an interresting (to me) discussion started there : https://issues.jboss.org/browse/JBRULES-46
This was about my remark about a backward-chaining mode that could be used to allow sequential mode to handle some kind of RETE updates (first rules could then trigger subsequent rules).
There are some number of answers after that, but I am not sure if I can answer them in the JIRA, so this post ...
To Mark :
" Currently our sequential mode works as single pass, but it has no inference as rete join memory is turned off. So it produces all the conflict set more efficiently, and then it uses rule order for the execution order of the conflict set. However changes in the current rule are not recognised by the later rules. That is planned though by "partinioning" the sequential engine around the modify statements. The advantage to this is we keep a single algorithm that is just configured slightly to provide different behaviours. Rather than two competely different engines. "
I think this is a very good solution, far much better (more efficient and far more clear to predict how rules will fire) than handling propagation for each individual rule's update. But I did not understand if it is already done in trunk in some way, or if it is something planned for future. And if so, the question after that is do you have an idea of when this could be done ? ... or if is quite affordable for someone not involved directly in drools developement? (like me for instance, as you speak of "sligth configuration").
To Michael :
You propose some new rules, by binding the "something" field in condition rather than calling getSomething() in action (and you change the object to which is applied the update, which is an error I think).
To me that changes nothing, the rule will loop as one of its binded value is changed ($value, and now $something..). And a no-loop property won't change this too ...
To summarize a bit, the use-case I present in the JIRA (create counters, fill them, validate them) could really take advantage (perfs, simplicity in authoring/design) of a sequential mode that could handle a partial inference (driven by a flow for instance, which seems quite natural for everyone (dev or BA)).
15 years, 3 months
Is it a valid use of \n in DSL
by Faisal Shafique
Hi,
I want to know if following is a valid use of '\n' i.e new line character in a DSL to put different patterns on different lines in resulting DRL?
[when]There is an instance of RulesContext=$rc:RulesContext()\n$ce:CaseEligibility()\n$cp:CertificationPeriod(startDate <= $rc.calculationDate, endDate >= $rc.calculationDate, caseId == $rc.caseId)
which results in following DRL
when
$rc:RulesContext()
$ce:CaseEligibility()
$cp:CertificationPeriod(startDate <= $rc.calculationDate, endDate >= $rc.calculationDate, caseId == $rc.caseId)
DSL parser expands this correctly but the question is whether this is a supported behavior or just works because of the way parsing works and hence may change in future?
Thanks,
Faisal Shafique
15 years, 3 months
Case study involving use of Drools in commercial SaaS healthcare application
by Nathan Bell
In some previous posts to the rules-users mailing list Mark Proctor has
asked for real world examples:
>>We often get complaints about not enough real world examples in
Drools.
>>We have a large community now, so surely a few of you must be able to
write up examples based on your work? So please, please, please, please
take the >>time to help us here.
>>Thanks
>>Mark
>>If you are doing anything interesting with drools and jbpm (was drools
>>flow) why not submit a paper on them at the Building Business
Capability event.
>>http://www.buildingbusinesscapability.com/
>>Mark
I will be presenting a case study entitled "Speed Saves Lives:
Leveraging a massively parallel expert system for patient surveillance"
about the use of Drools and GigaSpaces at the 2011 Business Rules Forum
Conference October 30 - November 3.
Abstract:
Pharmacy OneSource is a SaaS provider of applications for hospital
pharmacy and infection prevention professionals. This case study will
discuss the steps taken to develop a next-generation patient
surveillance platform that allows clinicians to accurately detect risk
factors, and perform interventions. The platform leverages the
GigaSpaces implementation of Tuple-space and the Drools rule engine to
create a massively parallel expert system. This architecture allows for
customizable handling of millions of HL7 messages per day, evaluation of
thousands of clinician created business rules, and reasoning over
hundreds of thousands of patient data facts to provide near-real-time
surveillance.
The presentation will attempt to cover challenges, design decisions, and
technology choices, ROI for the project and the platform, both
internally and externally, as well as lessons learned from adopting
business rules in the development process.
Thank You,
Nathan Bell
Software Architect
Pharmacy OneSource, Inc.
http://www.pharmacyonesource.com
15 years, 3 months
How does SpreadSheetCompiler work?
by Jay
Hi, All!
I got a question with SpreadSheetCompiler now.
The story is:
I have two Decision Tables,which are SOP.xls and quotation.xls. When I try
to write a class,named as XLSConverter.java to compile them to drl rule
files,
I found a strange thing--
1.The RuleSet of SOP.xls is 'com.my.booking.as.drools', after compiling
SOP.xls, the 'package' value of compiled drl file from SOP.xls is
'com.my.booking.as.drools';
And if I change RuleSet of it to 'com.sample', after compiling, package
value is also 'com.sample', which is normal;
2.But while RuleSet of quotation.xls is 'com.sample', after compiling
quotation.xls, the package value of compiled drl file from quotation.xls is
'rule_table';
And no matter what I change RuleSet of it to, after compiling it, its
package value is still 'rule_table'.
Could anybody please help me to explain why is that?
Any help is appreciated!
Yours sincerely,
Jay
--
View this message in context: http://drools.46999.n3.nabble.com/How-does-SpreadSheetCompiler-work-tp284...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years, 3 months