Fork me on GitHub
#clara
<
2016-07-07
>
genRaiy07:07:57

anyone using the durability feature? want to try it out on heroku with redis as a backend, wondering if there are any experience reports out there

genRaiy07:07:25

also @ryanbrush I note that the durability feature is experimental

genRaiy07:07:17

what is your thinking about what extra work needs doing there to conclude the experiment?

wparker17:07:49

@raymcdermott: The current durability implementation has some significant problems that are described at https://github.com/rbrush/clara-rules/issues/198 . Please feel free to ask questions here or there if anything is unclear. @mikerod is working on a more robust durability implementation that will be targeted at speed of rule execution after deserialization; I’ll let him speak to the current state of that. Do you mind elaborating a bit on your use-case for durability? For less taxing use cases performance-wise just re-executing the rules from your serialized facts might well be a good approach.

mikerod17:07:11

raymcdermott: I’d definitely say to suspect the durability of Clara to get a full overhaul. What is there right now hasn’t really been maintained and probably will fail or produce incorrect results for modern-day Clara sessions.

mikerod17:07:31

I’d definitely recommend reading through https://github.com/rbrush/clara-rules/issues/198 and I’d really like to know if these goals align with what you’d want out of it

mikerod17:07:39

(ass Will said above)

genRaiy19:07:00

k thanks - will take a look and give some feedback

genRaiy20:07:46

Serialising facts using transit out to REDIS would be enough in my case. I can imagine that vast rulesets would benefits but its not the case for my first set of use cases.

genRaiy20:07:26

I want to make a simple way to check a web user's disposition based on a small number of rules

genRaiy20:07:40

with Heroku any dyno should be able to answer any query and obtaining the facts from the back-end should be kept to a minimum, hence REDIS

genRaiy20:07:15

was also thinking that I could keep the data in a memoized set since I’m not talking about a huge number of user sessions and I can limit the size of the set with the help of core.memoize

genRaiy20:07:57

so it’s good to understand where the work is happening 🙂

wparker22:07:32

Yeah, if you’re OK with just running everything again to retrieve your state performance-wise that would probably be easiest. You’d want to just use your top-level input of course or account for the use of generated facts in your rules of course; inserting logically generated facts by Clara back into a session that then generates facts not in the original session is a problem with the current durability implementation as Mike mentions in that issue. Regarding the number of user sessions, just in case you don’t know, Clara sessions are immutable so you can just have a single base session without user-session-specific facts that you then add things into.