hello friends, is there a way to save the entire LocalSession in a db
I mean serialize/deserialise for later analyse
@baptiste-from-paris there is some support for this. It’s referred to as durability in the Clara codebase. You do have to implement a protocol though to serialize the working memory facts that are specific to your domain of use
nice 🙂
Also, the durability is currently targeted at being fast for serialization, but especially for deserialization. It doesn’t attempt to be able to deal with evolution to the stored data structures. If you have a change of rules, or a change of Clara version, sometime you may have to rerun rules and re-serialize.
ok, got it
Well to clarify, any change in rules requires a new run. A change in Clara version may or may not. It just depends on what changes.
yes offcourse
thanks for your time 🙂
was on it, but I had to ask the communuty 😉
Is this related to #portkey in some way? 😄
How might I accumulate facts of the same type to test if they are: all contain the same value and any contain a certain value?
@jeremy642 Sounds like 2 separate things, if so
;; ?all contain the same value for :val
[?all <- (acc/all) :from [A (= ?val val)]]
;; ?all has at least one containing :some-val for :val
[?all <- (acc/all) :from [A]]
[:test (some #(= :some-val (:val %))
?all)]
Yes 😛
However, the 2nd accumulator is weird, not sure why you want to accumulate like that
but perhaps
“any contain a certain value” sounds like a typical rule match
[?all <- (acc/all) :from [A (= ?val val)]]
and this will group each A
where they have the same value for val
Yes it is.
it’ll match and propagate for each grouping possible
Yeah, I think any would be a typical rule match.
I think my mind was just farting on it.
But on the all, does that work if there is a fact of the same type with a diff value?
A : 1, A : 1, A : 2, it shouldn't match since all As don't have the same value.
Maybe it'd be more like the 2nd one
Where you accumulate them all together, then apply a test to them.
Got it :thumbsup: Feel so accomplished when a rule works.
Did any of the visualization stuff that Ryan talks about in his videos get released?
I’m not seeing anything in the docs that would allow you to separate rule sets, and defrule
seems global…is there support (planned) for having “rule sets” for different things, or is the idea that you just keep your domains separate by having facts that don’t cross over and trust that the optimizations in the engine will make it mostly “not matter” when your rule set gets big because it covers 10 different domains?