This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-11
Channels
- # adventofcode (31)
- # announcements (6)
- # babashka (5)
- # beginners (93)
- # calva (15)
- # cider (20)
- # cljs-dev (16)
- # clojure (159)
- # clojure-berlin (1)
- # clojure-dev (5)
- # clojure-europe (9)
- # clojure-italy (9)
- # clojure-losangeles (2)
- # clojure-nl (26)
- # clojure-spec (7)
- # clojure-uk (33)
- # clojurescript (54)
- # clojutre (5)
- # cursive (20)
- # datomic (23)
- # emacs (19)
- # events (1)
- # expound (1)
- # figwheel-main (1)
- # fulcro (104)
- # hyperfiddle (1)
- # jobs (1)
- # luminus (10)
- # malli (59)
- # nrepl (1)
- # off-topic (11)
- # pathom (5)
- # planck (15)
- # reagent (13)
- # reitit (8)
- # rewrite-clj (10)
- # ring-swagger (3)
- # shadow-cljs (129)
- # tools-deps (46)
- # xtdb (14)
- # yada (1)
Hi what is a good choice for :crux.node/kv-store
if I want to run a JDBC postgres setup locally? I can't seem to find the possible options for :crux.node/kv-store
in the documentation
I would check examples directory, but I’m not sure
@U0HJD63RN hey! Sorry for the late response on this - the answer is RocksDB is a sensible default, and you'll want to use this alongside the JDBC topology options (https://opencrux.com/docs#config-jdbc)
:crux.node/kv-store "crux.kv.rocksdb/kv"
:crux.kv/db-dir "data/db-dir-1"
Ah thanks @U899JBRPF Didn't realize that you JDBC driver was only a replacement for the kafka commit log?
Ahh, yes that's how crux-jdbc works today. It's plausible to write a KV backend for SQLite but RocksDB/LMDB will be faster. The main requirement for the KV indexes is that they are local to the query engine, so it's not feasible to use a "remote" KV store powered by e.g. a Postgres cluster
when calling crux/db
immediately after crux/submit-tx
, is it guaranteed that I see the changes that were just transacted?
No. See sync
Thanks for asking, I’ll extend the the docstring, when I’ll be around or perhaps @U899JBRPF may get there first
Is there a way to use the :crux.tx/tx-time
that submit-tx
returns to sync up to that point? I'm trying this
(defn submit-tx [crux tx-ops]
(let [tx-time (:crux.tx/tx-time (doto (crux/submit-tx crux tx-ops) prn))]
(crux/sync crux tx-time 1000)
nil))
but this returns
Unhandled java.lang.ClassCastException
java.util.Date cannot be cast to java.time.Duration