clara

http://www.clara-rules.org/
alex-dixon 2017-12-23T00:46:10.000097Z

Interesting. And yeah seems we’re talking about the same with update/modify. I’m only slightly familiar with it from Drools.

alex-dixon 2017-12-23T00:48:00.000069Z

I searched the slack history at clojureverse and wasn’t able to find your explanation 😞. Sounds very intriguing. I’ll keep looking and thinking about this over the holiday. Thanks so much for your responses they give me a lot to think about 🙂

2017-12-23T00:48:39.000081Z

I think I’ll just make a blog post on the external update thing

2017-12-23T00:49:58.000086Z

Yeah, Drools had an update mechanism. I think they had some interesting optimizations done with it. Even more so in 6+ of it when they had a large overhaul to how the fact propagation of the rule network worked I think.

2017-12-23T00:50:24.000033Z

I used to spend quite a bit of time trying to parse through the Drools codebase. It’s pretty “intense” though 😛

alex-dixon 2017-12-23T16:24:40.000037Z

Have you read Clara’s source? 😄

2017-12-23T16:25:27.000040Z

Haha. Oh yes. I’m all caught up on that one.

alex-dixon 2017-12-23T16:22:59.000103Z

Is 6+ with the Phreak algorithm instead of Rete?

alex-dixon 2017-12-23T16:23:24.000083Z

Sorry…I should just google that….:)

2017-12-23T16:25:53.000003Z

Yep

2017-12-23T16:26:47.000050Z

I don’t know that I fully consider it separate. But they do. It does have a lot of modifications over rete. However all modern rete impl’s do.

2017-12-23T16:27:49.000057Z

There are some good ideas there though. I think Clara is competitive with the optimization it has though in many cases.

2017-12-23T16:29:14.000050Z

Drools 5 vs 6 added a lot of things at once. It makes it hard to know which ones are paying off the most. At least from what is public. I think the most important optimization was just the batched fact propagation across the network. That is done in Drools 6 phreak via a “lazy” sort of evaluation of rules.

2017-12-23T16:30:22.000037Z

Clara could potentially do a bit better with lazy propagation. However just having the batched propagation seems to work pretty well already.

alex-dixon 2017-12-23T16:31:50.000021Z

I thought Phreak was more eager

alex-dixon 2017-12-23T16:33:13.000032Z

Overall I’m under the impression Clara was written with distributed computing in mind…I don’t know if other rule engines compete with that, and to me it seems like a ridiculously powerful feature

2017-12-23T16:40:30.000077Z

Hmm. It should be more lazy. Hah. There are lots of blogs on it by Drools people. Good blogs really. They put out some good content that is helpful more generally

2017-12-23T16:41:09.000065Z

But yes Clara does a good job in terms of its flexibility to be used in different ways.

2017-12-23T16:41:30.000066Z

Some good abstractions in place.

alex-dixon 2017-12-23T16:46:23.000063Z

Have you used clara-storm or have any desire to run Clara across multiple instances?

2017-12-23T16:57:16.000036Z

That was Something Ryan put together early on with Clara. I believe he said it was mostly an experiment or demonstration of how it might be done. Not a production worthy product.

2017-12-23T16:58:44.000111Z

And early on I think he had some thoughts about where to apply it but went in a different direction instead. I haven’t had the need but I’ve spent a little time thinking about it. I think it’d be cool to see Clara used across Something like distributed processes

2017-12-23T18:07:45.000016Z

Yeah, Storm support was just an experiment for a need that never really materialized so we didn't pursue it further. The internals of Clara were designed to support a distributed working memory, so it could be something we pick up at some point.

👍 1
alex-dixon 2017-12-23T18:19:37.000048Z

All tests are passing last I checked 🙂

alex-dixon 2017-12-23T18:22:12.000085Z

I’ve been interested in two applications related to it. Mainly stream processing with Kafka but also web workers in the browser

👍 1
2017-12-23T20:16:44.000034Z

The test coverage in that project is pretty weak, though. We're using Clara in Spark now, but are keeping working memory local to each worker...basically our workload lets us do groupby operations to group needed facts into a common process and then using Clara there.