This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-07
Channels
- # announcements (2)
- # babashka (24)
- # beginners (15)
- # calva (27)
- # clara (3)
- # clj-kondo (6)
- # cljs-dev (2)
- # clojure (83)
- # clojure-dev (35)
- # clojure-europe (82)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-nl (5)
- # clojure-spec (52)
- # clojure-uk (14)
- # clojurescript (43)
- # conjure (16)
- # cursive (29)
- # data-science (1)
- # datalog (5)
- # datomic (1)
- # deps-new (8)
- # depstar (4)
- # emacs (6)
- # events (1)
- # fulcro (24)
- # jobs (4)
- # malli (12)
- # off-topic (46)
- # rewrite-clj (14)
- # shadow-cljs (53)
- # spacemacs (8)
- # specter (2)
- # sql (21)
- # tools-deps (62)
- # vrac (1)
- # xtdb (2)
What would be the most efficient way to get notified when results of a specific query have changed?
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.
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.