Fork me on GitHub
David Epstein08:03:58

Hi folks. I'm new to clara, clojure, and the JVM. Can anyone summarize the main differences between clara and all the many available datalog variants (datascript, datahike, xtdb, etc) in terms of use case and performance? I'm somewhat familiar with Prolog. I'm interested in encoding the logic of human-like agents in a simulation, primarily to determine their beliefs, emotional state, and goals.

Drew Verlee12:03:41

I'll take a guess, but wait for an expert. You just asked to compare ules engine against graph databases. Rules engines are reactive by default, that means if you tell it a new fact, you expect as an outcome, for some action to be taken. E.g inputing a new user might result in sending an email. Rules engines are forward chaining, graphs are backwards chaining. The creator of asami has some really good YouTube talks on this i believe...

Drew Verlee12:03:24 @U0395BDNRG8 i believe this will explain it better then i could

David Epstein20:03:47

This was a really interesting talk. Thanks @U0DJ4T5U1. Paula Gearon describes Naga, which--if I understood correctly--is a forward chaining engine with Prolog syntax that uses a graph version of the Rete algorithm. Asami isn't mentioned by name, but perhaps it is the internal graph database she mentioned? I like the inclusion of OWL-like symmetric properties attached to rules.

Drew Verlee20:03:34

Asami is the database she mostly built, it's really interesting. I believe it creates schema on write.

David Epstein05:03:46

@U0DJ4T5U1 these both look like great projects. I'm already comfortable with Prolog syntax so Naga would be perfect for me--if there were a community of users. Otherwise, I'm nervous about adopting code that I don't understand.

Drew Verlee12:03:12

I can't help much there as those talks represent the limits of what i know of the topic :)

Al Baker14:03:27

I lead the solution architect team at Stardog -- it implements the OWL spec, and has one of the most advanced and feature complete reasoners around. The SPARQL language gives you datalog (nonrecursive), and the ability to run those queries w/ inferencing. There's a bunch of use case material on -- but for me it all boils down to being able to create unified views of data, using the power of graph + inference to help connect/clean things up, and then use that to build stuff (whether it be data science, BI/SQL dashboards, custom apps, etc). There are some more leading edge/advanced use cases outside of your data management, query, and improving all that.. for example, our CTO built a hierarchical task network (HTN) planner based on OWL reasoning, and HTN planners (and planners in general) have a bunch of interesting use cases

👍 2
David Epstein15:03:03

Thanks @U0DCK21EJ. I've experimented with Stardog a bit in the past. I'm looking for something I could embed in a desktop or possibly even a mobile application without a server. I don't think that is what Stardog is for--right?

mikerod16:03:05 maybe some higher levels details with regards to Clara. Which is indeed forward chaining and based on the classic rete algorithm.

👍 1

Clara tries to act as fairly “light weight” to plug into whatever ever app organization you have for your own facts and data. No dependence on a db choice etc.


The working memory along with a few other parts are pluggable interface. I don't know of many people who have plugged others in though.


The default is working memory is just in memory.


Standard clj like data structures used.

Al Baker02:04:59

@U0395BDNRG8 yeah not practical to do that. Stardog can run embedded in a JVM, but it's not small... I could squeeze it into like 380ish MB of ram back in the day when I was trying to get an app on the cheapest possible Linode server possible. These days, Stardog is more for solving problems in the data warehouse or data lake. There is good news though, there is a Stardog Free version now

👏 1