Let’s say that a start-of-day, every day, we generate a giant 2,000+ rule .DRL, that we then use to construct into a
single run-time KnowledgeBase reference. We then construct a single run-time KnowledgeSession reference (also at start of day). Throughout the day, all day, facts “arrive” asynchronously into our expert system. When a fact “arrives”, we synchronously
place the fact onto our single KS and call .fireAllRules(), which in turn synchronously outputs answers that satisfy our “what’s the next step?” decision requirements.
We have this working very well, but we have the ambition to achieve more.
We want to attempt to scale this solution to accommodate the high-frequency simultaneous “arrival” of many facts. We have at our disposal a 24xCPU 128 gb Linux-based compute resource (nice, right?) … so,
ideally, we have the ambition to potentially accommodate the simultaneous arrival of 24 facts into our expert system.
Assuming that all of our 2,000+ rules are completely isolated (i.e. no rule i ever depends on any rule j, for all i,j) we want to consider building (at start of day) a KSPool (size 24) , KBPool (size 24),
and a ThreadPoolExecutor (size 24, backed by BlockingQueue). As facts arrive throughout the day, those that arrive simultaneously are Queue’d to the TPE, that then delegates the fact’s need for service to a task Runnable, which in turn calls a KSPool[i].fireAllRules()
(with isolation to KBPool[i]). In such a scheme, we would potentially be able to render decisions concurrently when facts arrive simultaneously ( capacity 24).
Is this design ambition common w/in current DROOLs use cases? Does the current (or future) DROOLS offering include any in-place capability to Pool KS or Pool KB? If not, are there any potential DROOLs concerns
or “gotchas” wrt to our pursuing this ambition (in a “let’s build this now!” prototype)?
As always, tremendous thanks to all in this community forum.
Ben D Cotton III
Morgan Stanley & Co.
OTC Derivatives Clearing Technology
1221 AOTA Rockefeller Ctr - Flr 27
New York, NY 10020
(212)762.9094
ben.cotton@ms.com