This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-15
Channels
- # announcements (1)
- # babashka (81)
- # beginners (48)
- # calva (49)
- # clj-kondo (52)
- # cljdoc (7)
- # cljs-dev (39)
- # clojure (33)
- # clojure-australia (18)
- # clojure-europe (48)
- # clojure-italy (2)
- # clojure-morsels (2)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # conjure (6)
- # cursive (3)
- # data-science (29)
- # datalog (4)
- # datomic (14)
- # events (1)
- # fulcro (1)
- # graphql (18)
- # gratitude (2)
- # helix (11)
- # introduce-yourself (2)
- # java (15)
- # keyboards (2)
- # lsp (6)
- # luminus (4)
- # membrane (32)
- # minecraft (1)
- # missionary (7)
- # nextjournal (2)
- # off-topic (28)
- # portal (28)
- # releases (1)
- # ring (1)
- # shadow-cljs (3)
- # sql (6)
- # xtdb (23)
naive question: is there a reason to persist Datalog in a graph database vs a KV store?
Hi Jack 🙂 this answer is assuming that you are referring to persisting Datalog facts, rather than Datalog queries. I'd say the difference between a "graph database" and a KV store here is one of abstraction. Graph databases offer a high-level API but may use many different strategies for persistence and indexing behind the scenes, for instance https://oss.redis.com/redisgraph/ uses sparse matrices and https://terminusdb.com/ uses succinct data structures. However a sorted-KV interface (whether backed by a b-tree, LSM or something more fancy) is also a valid and useful storage abstraction on which to build a graph database - this is essentially the approach taken by all of the Datalog engines listed on https://clojurelog.github.io/ (with the exception of Asami, IIRC).
All layering of abstractions come with costs and all underlying data structures have different performance & scaling trade-offs. For instance sparse matrices are expensive to update, which makes them broadly inappropriate for OLTP use-cases (as I understand it), but they are a good order of magnitude faster for querying than anything else.