it's similar to obtain data from a table with lots of record, i think the point to solve this problem focus on the strategy how to improve the hit point of ur cache. There are many strategies ,such as hibernate,jive..., can sufficiently handle data cache. In the same time, not to cache the ruleset, since the parse process is a time wasting process.Try to cache the rule base instead of rule set, u will improve ur system dramatically!
-----邮件原件----- 发件人: Marcelo Tallis [mailto:[EMAIL PROTECTED] 发送时间: 2006年2月23日 10:30 收件人: [email protected] 主题: [drools-user] Dealing with a massive number of rulesets 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 ******************************************************************************************************************************** The information in this email is confidential and may be legally privileged. If you have received this email in error or are not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be monitored to ensure compliance with internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks. 收发邮件者请注意: 本邮件含保密信息,若误收本邮件,请务必通知发送人并直接删去,不得使用、传播或复制本邮件。 进出邮件均受到本公司合规监控。邮件可能发生被截留、被修改、丢失、被破坏或包含计算机病毒等不安全情况。 ********************************************************************************************************************************
