[rules-users] Managing memory

Wolfgang Laun wolfgang.laun at gmail.com
Sun Dec 11 11:47:32 EST 2011


I can't imagine a questionnaire with more than 100 questions - at least I'd
baulk and probably drop out if there were more ;-). So, let's settle for
100. Then, if there are 100 or 1000 concurrent users, I don't see any
problem with storing 10000 or 100000 answers, and the rete nodes for the
kind of rules you have indicated should also remain within tolerable limits.

Is there any daunting experience so far or is it just a "gut feeling"? Some
protyping should clear the fog...

-W



2011/12/11 Laird Nelson <ljnelson at gmail.com>

> Hello; this is probably a pretty basic kind of question, but I want to see
> what other users' tricks are for managing memory in their sessions.
>
> My application is a straightforward survey-type application.  There are
> questions, choices, answers (choice selections) and so on.  Once someone
> has selected an answer, the rule evaluation kicks in.  The determination of
> which question to show next is made based on...well, pretty much anything.
> Typically it's on the current user's last answer to a question, but it
> might also involve his answers to several previous questions in his own
> path through the survey.
>
> This being psychology-related, there are hundreds of questions and
> probably hundreds of rules.  "If the question the user just answered is
> question 4, and if the user selected 'sometimes' as the answer to question
> 4, and if he also selected 'never' as the answer to question 1 during this
> interview session, and he is over 40, then show him question 25 next" is a
> good example of one such rule.  You can see how there might be nearly one
> rule for each question.
>
> (The rulebase session itself could probably be sequential--none of the
> facts in the session is modified in such a way that reevaluation of the
> rulebase is necessary.)
>
> OK, so, currently I load pretty much everything into the (stateful)
> knowledge session I have.  That means--what with all the question text and
> answer text and everything--there is a LOT of data in this particular
> session.  Multiply times the number of concurrent interviews being
> administered and this thing chews through heap in a hurry.
>
> One approach I thought of was to simply load the current question into the
> session as a fact and then rely on various accumulate functions to load
> other questions and answers as necessary.  But this approach isn't much
> better than a linear series of if/then statements, if I understand
> correctly.
>
> What are some of the so-called best practices here?  Are there particular
> Drools-centric development approaches I should be taking, or architectural
> choices I should be making?  Or is this just a case of throw hardware at
> the problem?  :-)
>
> Again, I'm not so much looking for A Single Right Answer as I am reports
> from the field.  You may feel free to contact me directly if you wish.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111211/74d62c9e/attachment.html 


More information about the rules-users mailing list