clara

http://www.clara-rules.org/
sparkofreason 2020-09-07T13:42:44.010500Z

What would be the most efficient way to get notified when results of a specific query have changed?

2020-09-11T08:22:48.012100Z

Clara computes query results upfront; when you call (query session ….) you’re basically just doing map lookups. https://github.com/cerner/clara-rules/blob/main/src/main/clojure/clara/rules/engine.cljc#L1998 So I don’t think different ways of doing this would have much difference in terms of performance; you’d probably want something that stores the previous state, calls query on the session, and then compares them.

sparkofreason 2020-09-11T22:59:38.014400Z

I was thinking more in terms of getting notified per query only when the results changed. I'll look at doing it with a listener.