This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-06
Channels
- # announcements (69)
- # aws-lambda (3)
- # babashka (45)
- # beginners (28)
- # calva (4)
- # clara (7)
- # clojure (23)
- # clojure-spec (5)
- # clojure-uk (18)
- # clojurescript (57)
- # clojutre (1)
- # cursive (20)
- # datomic (31)
- # emacs (5)
- # figwheel-main (3)
- # fulcro (16)
- # graalvm (7)
- # luminus (4)
- # nrepl (9)
- # off-topic (50)
- # re-frame (8)
- # reitit (2)
- # rewrite-clj (10)
- # shadow-cljs (88)
- # spacemacs (1)
- # sql (6)
- # vim (2)
Are clara sessions intended as throwaway cheap things meant to replace an elaborate cond
? I have a long running process that receives events every few seconds, and needs to make decisions based mainly on that new data point, and to a lesser extent some previous, accumulating state, but not previous events in the stream. Which one is the default approach with clara: a new session for each new data point, adding in the needed extra state with insert
? Or should I be building up one session over time and retracting the old/unused data points
Put slightly differently, the "sensors" example in the clara-examples repo seems similar to what i'm trying to do, but I'm not quite sure how the main function would translate to the "real world": https://github.com/cerner/clara-examples/blob/master/src/main/clojure/clara/examples/sensors.clj#L87 Should the same session persist throughout the long-running process that provides the sensor data? Or is the run-examples
function similar to something that would be called frequently in response to new data?