This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-03
Channels
- # announcements (3)
- # asami (4)
- # aws (1)
- # babashka (22)
- # beginners (111)
- # calva (3)
- # cider (1)
- # clj-kondo (55)
- # clj-on-windows (9)
- # cljsrn (1)
- # clojure (13)
- # clojure-europe (35)
- # clojure-losangeles (3)
- # clojure-nl (2)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (5)
- # clojurescript (51)
- # conjure (5)
- # cursive (5)
- # datascript (1)
- # datomic (27)
- # deps-new (8)
- # depstar (41)
- # emacs (4)
- # fulcro (24)
- # graphql (4)
- # gratitude (8)
- # helix (36)
- # jobs (2)
- # leiningen (2)
- # lsp (11)
- # off-topic (24)
- # pathom (23)
- # pedestal (2)
- # polylith (27)
- # re-frame (12)
- # reagent (7)
- # reitit (1)
- # releases (3)
- # remote-jobs (1)
- # rewrite-clj (4)
- # sci (1)
- # shadow-cljs (27)
- # spacemacs (12)
- # tools-deps (31)
- # web-security (2)
Is ?sslmode=require
respected on Postgres connections for Datomic peer server? We're not sure if it is, but we'd like to enforce SSL on all our Postgres connections. This far, we were unable to connect via SSL
Hi! Is it possible to use datomic.client.api against on-prem Datomic, from a peer server itself? (B/c I want to use ragtime.datomic, which uses the client API) https://docs.datomic.com/client-api/datomic.client.api.html#var-client it would seem I need to run a separate peer server?!
FYI typo in the official docs at https://docs.datomic.com/on-prem/overview/clients-and-peers.html > begin with Datomic dev-local, which [should be with?] the client library in-process.
Is the d/datoms :eavt index guaranteed to be sorted in ascending order of of :e? e.g., the following is true
(= (sort-by :e (d/datoms db {:index :eavt})) (d/datoms db {:index :eavt}))
I'd like to iterate through the d/datoms eavt index as fast as possible, applying parallelism if possible. Are there any techniques for doing so? Using :offset & :limit to batch doesn't seem like an effective strategy since d/datoms will need to walk the whole datoms index regardless.
offset+limit will turn it into O(n!); just consuming it will continue from whatever chunk pointer it has
for doing stuff in parallel, if you can use :AEVT instead, you can find all the :As and issue a d/datoms for each one
Does the sync client API officially support passing :chunk? From the code, I see that it happens to work right now since the sync arg map is just passed to the async api.
> https://docs.datomic.com/client-api/datomic.client.api.html functions are designed for convenience. They return a single collection or iterable and do not expose chunks directly. The chunk size argument is nevertheless available and relevant for performance tuning.
in addition, AFAIK the sync apis are implemented with the async ones, so this makes sense
Curious, have you had to handle exceptions thrown while traversing d/datoms? Ending up with some wacky feeling code:
(defn read-datoms-with-retry!
[db argm dest-ch]
(let [datoms (d/datoms db argm)
*offset (volatile! (:offset argm 0))]
(try
(doseq [d datoms]
(async/>!! dest-ch d)
(swap! *offset inc))
(catch ExceptionInfo ex
(if (retry/default-retriable? ex)
(do
(read-datoms-with-retry! db (assoc argm :offset @*offset) dest-ch)
(log/warn "Retryable anomaly while reading datoms. Retrying from offset..."
:anomaly (ex-data ex)
:offset @*offset))
(throw ex))))))