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