Fork me on GitHub
#clara
<
2019-05-15
>
Drew Verlee16:05:49

Apologies for asking wide sweeping and possible horrible inaccurate questions: 1. clara (and rules engines in general) has no story for how to persist data correct? 2. datatomic and clara would seem to overlap in that they both use declarative joins to query data. 3. clara has reactive in memory updates to rules, while nothing in the dataomic ecosystem offers this (that i know of, which isn't saying much). It seems like reactive datalog, would bridge many of these gaps (but at what costs!). However, i also assume maybe trying to bridge these differences at the library/database level has large implications for how your system has to be setup (databases, etc...). especially in order to be fast enough to be interesting.

mikerod20:05:48

@drewverlee > 1. clara (and rules engines in general) has no story for how to persist data correct? Yeah, for the most part it doesn’t do that. There is some foundations for “durability” supported, but subject to change, but it’s nothing like datomic or something to that extent. > 2. datatomic and clara would seem to overlap in that they both use declarative joins to query data. There is some overlap in how you query data out perhaps. However, it’s done much differently. Datomic assumes much more of an ecosystem around it. Clara is a lightweight lib you can drop in the middle of your app and it just is a way to express conditional logic that is perhaps hard to express well with your own if-then logic. It also gives you the ability to be more declarative in describing your logic by using a truth maintenance system and a modern variant of the classic rete algorithm for perf benefits. > 3. clara has reactive in memory updates to rules, while nothing in the dataomic ecosystem offers this (that i know of, which isn’t saying much). I can’t say exactly that datomic is lacking this. I think you’d have to put a system over it indeed. You allude then to datalog, which is probably similar to Clara in nature, but I believe it is based on backwards-chaining logic, so then you have to consider forward vs backwards chaining for your application area. Hopefully this sheds some insight for you.

👍 8
Drew Verlee20:05:36

This is hugely helpful, thank you. I was only recent aware of forwards chaining logic and to find out there is a (potentially) a relationship with datalog through a similar model, backwards chaining logic, is very interesting.

mikerod20:05:51

No problem. Yeah, exploring forwards vs backwards chaining and when one may be better suited or not is always a topic of interest to me.

mikerod20:05:07

I think more or less, you can do similar things in both, but one may be more optimal for certain usages than the other

mikerod20:05:39

And in Clara’s case specifically, queries are expressed in a pre-defined way that is built directly into the rules network - via something such as defquery. So they are “pre-canned” and actually participate in the forward-chaining logic just like any other rule does. Something like datalog, I believe you just specify arbitrary queries on demand. These then form backwards chaining execution paths. More like a relational db query or something to that extent.

Drew Verlee21:05:43

I think your right mike, that very much gels with what i understand in principle about both. I think my next step is some papers and hammock time. Thanks a ton!

clj 4