datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
borkdude 2018-12-29T11:03:03.002200Z

Wasn’t there a plan to make persistence for DataScript? I don’t see it mentioned in this discussion: https://www.reddit.com/r/Clojure/comments/aa4aaf/taking_datahike_for_a_spin/ but it seems relevant

ClashTheBunny 2018-12-29T13:45:51.004400Z

@niko963, isn't there a sense that https://github.com/comnik/clj-3df plus https://github.com/comnik/declarative-dataflow sitting on top of Kafka or datomic to persist things is like DataScript persisted?

ncg 2018-12-29T16:15:40.017100Z

@clashthebunny there is such a sense, at least for the read-side. On the write side the interesting thing is that Datomic transaction functions have transaction-time, ad-hoc access to the current database value. And if there is one thing that declarative-dataflow is not optimised for then that would be ad-hoc queries. A solution is to express transaction functions as dataflows, e.g. [:db.fn/cas e a v v'] would be something akin to a join between ((e a) (v v')) and ((e a) current-v) followed by a semijoin between (v v') and (current-v) resulting in [e a v'] tuples. While that sounds exciting (to me), I am sure it'll come with a number of interesting trade-offs and open questions. Finally the mode of interaction will probably be different enough to be annoying to people who are just looking for an out-of-memory DataScript.

ncg 2018-12-29T16:22:41.017800Z

FWIW we're using a durable log + DataScript on the backend for a smaller-scale project and are very happy with it.