This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-12
Channels
- # beginners (40)
- # boot (2)
- # cider (16)
- # clara (2)
- # cljs-experience (2)
- # clojure (100)
- # clojure-italy (11)
- # clojure-russia (2)
- # clojure-spec (9)
- # clojure-uk (34)
- # clojurescript (36)
- # community-development (3)
- # core-async (4)
- # cursive (4)
- # datascript (1)
- # datomic (20)
- # duct (10)
- # emacs (1)
- # fulcro (2)
- # off-topic (40)
- # onyx (12)
- # overtone (8)
- # portkey (6)
- # quil (1)
- # re-frame (7)
- # ring-swagger (2)
- # shadow-cljs (2)
- # spacemacs (2)
- # test200 (10)
- # tools-deps (16)
- # unrepl (1)
- # vim (24)
Hey guys, got a little question regarding Datomic and Consistency. The official website claims that Datomic is consistent in both the ACID and CAP senses, now the ACID one I can understand since we have serialised transactions but how does it achieve consistency in the CAP sense if we have an eventually consistent storage backend? The C in CAP states that "Every read receives the most recent write or an error".
So if a peer gets an error for a key, it knows the storage just doesn’t have it yet. But if it gets a value, it knows the value will never change
There are still a small number of keys (less than ten) that are updated—they store root pointers. The storage impl makes sure they’re written with stronger consistency
But is it guaranteed that you'll always get the latest "db value" when you do (datomic.api/db conn)
?
You can use the sync functions if you need to ensure you are caught up to a specific db t
Eg one of your servers saw db at time t, and sent something to another which expects to read at least the same db value or newer
If you transmit the t also you can use sync to ensure you are at least as far along as the server that sent the message
Ok so if I were to need to coordinate some actions between services, I would have to send the time-basis for the previous tx in my message then use sync, is that correct?