[rules-users] Can Drools supply large Knowledge Base?

rouvas at mm.di.uoa.gr rouvas at mm.di.uoa.gr
Mon Dec 12 05:12:18 EST 2011


WangRamon wrote:
>
> Hi Stathis You're probably right, maybe it's a wrong question, i'm new to
> Drools, so I copy the rule sample from user guide as below to better
> explain, that's what i need, but the rule will be automatically generated
> in the future.. package com.company.license
>
> rule "Is of valid age"
> when
>     $a : Applicant( age < 18 )
> then
>     $a.setValid( false );
> end So in the future the rule may include more and more conditions like
> below:
>
> rule "Is of valid age2"
> when
>     $a : Applicant( age > 18 and age < 20 )
> then
>     ...end
> So it may grow to be a very large rule(?), and this is actually my

Actually you have expressed two rules not one. "Is of valid age" and "Is
of valid age2" are two different rules in Drools-land.

Also saying "very large rule" is problematic. What would you count as
"large"? A lot of rules? A lot of conditions inside each rule? And how big
is that "large"? Tens? Hundreds? Thousands?

I'd suggest that you press "pause" here and ponder on the problem a bit.
You mention that you are new to Drools. I'm guessing that you are also new
to rule based systems, else you wouldn't be having these questions.
I'd suggest you read the first chapters of the Drools Manual and make sure
you understand all the notions that are mentioned there. For example,
rule-based systems, forward-chaining, backward chaining, rules vs facts
and especially the differences between functional and logic programming.

Once you understand these topics, re-read the answers to your post by
Esteban and Wolfang (posted previously). Enlightenment will be bestowed
upon you.

-Stathis

If you're experimenting

> question: how to handle this big rule? Thanks you guys CheersRamon> Date:
> Mon, 12 Dec 2011 11:33:10 +0200
>> From: rouvas at mm.di.uoa.gr
>> To: rules-users at lists.jboss.org
>> Subject: Re: [rules-users] Can Drools supply large Knowledge Base?
>>
>> WangRamon wrote:
>> >
>> > Hi Guys I'm still confused about this question, let's say i may have a
>> > very large rule set, how can Drools support this case, will it load
>> every
>> > rule into memory? Any idea? Thank you guys. CheersRamon
>>
>> You are either asking the wrong question or you do not understand what
>> you
>> are asking.
>>
>> In your previous post, you mentioned a Knowledge Base of 100GB.
>> In this post you are talking about a rule set.
>> These are different things.
>> A Knowledge Base contains rules *and* facts and can indeed be quite
>> large.
>> A rule set contains only rules. For a rule set to grow this much, it
>> means
>> you have seriously misunderstand your problem. I would suggest you go
>> back
>> to the drawing board.
>>
>> Real-world example:
>> Rule set of about 400 rules.
>> Facts : In the order to 100.000.
>> Command line execution shows an approximate 400MB RAM consumption,
>> meaning
>> with the JDK and all (not only Drools memory consumption).
>>
>> So, unless you want to hear from someone more experienced than me, I'd
>> suggest you re-phrase your question by stating the exact problem you are
>> facing or anticipating.
>>
>> Cheers,
>> -Stathis
>>
>>
>>
>> >  From: ramon_wang at hotmail.com
>> > To: rules-users at lists.jboss.org
>> > Date: Thu, 8 Dec 2011 11:59:21 +0800
>> > Subject: [rules-users] Can Drools supply large Knowledge Base?
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > Hi All
>> >
>> > I'm new to Drools, I will build a very large Knowledge Base, let's say
>> it
>> > will be larger than 100GB, the files will be stored in a distribute
>> > database, so can Droools supply this large Knowledge Base? Any
>> solution?
>> > Thank you very much.
>> >
>> > Cheers
>> > Ramon
>> >
>> >
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>





More information about the rules-users mailing list