With Drools 2.1, no, if you serialize it will compiler the snippets each
time.

Yes, if you did a DSL where you implemented the condition logic yourself
(not as java snippets) then it would not "compile" each time.

Alternatively, with drools 2.5 (and of course 3.0 coming up) you can
pre-compiler rulebases/rules to binary form, and have them loaded up very
quickly (which would be ideal for you). So there are possibly solutions, but
not using 2.1 version (other then your own DSL).

On 2/23/06, Marcelo Tallis <[EMAIL PROTECTED]> wrote:
>
> We want to implement a web service. We have a massive number of rulesets
> stored in a DB (too many to have them all loaded in memory at once). The
> rulesets are very simple and involve only a couple of dozens rules each.
> We
> receive (let say) millions of requests a day from clients. Different
> requests may require different rulesets. For every request: we load the
> required ruleset, update some facts in working memory, fireAllRules, and
> respond within a user tolerable response time.
>
> Question:
>
> What kind of tricks can we use to minimize the time to set up the
> execution
> of a rule set? Having to parse the rule set, compile it, set up the
> working
> memory, etc. for every request seems too expensive.
>
> For example:
>
> - Can we store serialized rulesets in a DB? How?
>
> -  Can we avoid the compilation of the java snippets in the rules each
> time
> we load (or de-serialize) a ruleset? Is this compilation time significant?
>
> - Would a domain specific language (one for all rulesets) save us some
> significant compilation time?
>
> Thanks,
>
> Marcelo
>
>

Reply via email to