This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-24
Channels
- # announcements (2)
- # beginners (130)
- # calva (72)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (3)
- # cljsrn (2)
- # clojars (4)
- # clojure (55)
- # clojure-nl (1)
- # clojure-uk (19)
- # clojurescript (46)
- # cursive (95)
- # datomic (6)
- # figwheel (40)
- # fulcro (12)
- # hyperfiddle (3)
- # off-topic (11)
- # onyx (3)
- # parinfer (6)
- # pathom (15)
- # protorepl (38)
- # re-frame (67)
- # reitit (18)
- # shadow-cljs (45)
- # tools-deps (2)
Question about the Datomic model - does Datomic seek to ensure that every node is at the same point in the transaction history? i.e. if I append to an existing Datom, is it legal for one node to return the Datom before append (and eventually converge on the new value as it reads more of the log) and another to simultaneously have read the log and return the appended value?
@samcgardner I think all queries have a time-basis, so you will get strongly consistent results (i'm not sure what happens if the node doesn't have that time-basis, my system calls d/sync a lot to wait for catchup when necessary) https://docs.datomic.com/client-api/datomic.client.api.html#var-sync
I believe you can use (datoms db arg-map)
to request things without a time-basis if you want to
If you use a single db
you will of course observe consistency in your usage, I'm just interested in whether or not you're guaranteed to get the same db
whichever backend ends up servicing your request at a time T
Oh! d/db will return a dbval with the most recent time-basis known to the node. If this is important to your app, can you extend the time-basis all the way down to your api client, so the node can d/sync to exactly the right time basis every time?
I'm just curious about the implementation in Datomic. I assumed it was going to be along those lines, since enforcing immediate consistency across all nodes seems needless according to the model, but wanted to validate my assumption. Thanks!