threatgrid / asami

A graph store for Clojure and ClojureScript
Eclipse Public License 1.0
633 stars 29 forks source link

Comparison to DataScript? #99

Open vvvvalvalval opened 3 years ago

vvvvalvalval commented 3 years ago

At first glance, it can be hard to determine if one would be better served by DataScript or Asami, both being in-memory Datalog engines.

Compared to DataScript, the most significant limitation I see, as mentioned in this issue, is that Asami seems to have no with operation, and as such cannot be treated as a persistent data structure. Another one is the lack of mutually-recursive rules.

A potential advantage of Asami is the query plan, but this would need to be confirmed by evidence that this translates to a performance advantage.

Hendekagon commented 3 years ago

Loom integration also looks good, maybe this provides an alternative to recursive rules ? One thing I would like from Datomic or Datascript is weighted edges (possible, but cumbersome), maybe Asami with Loom also covers this ?

quoll commented 3 years ago

Being in memory, the lack of with wasn't an issue for us. It can be added easily. It's going to need work once durable storage comes online.

Yes, in-memory Asami supports weighted edges. You need to specify a multigraph instead of a standard graph. The easy way for that is to use a connection URI that starts with asami:multi/ instead of asami:mem/