This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-07
Channels
- # adventofcode (202)
- # aleph (8)
- # announcements (13)
- # architecture (1)
- # aws (2)
- # beginners (201)
- # boot (1)
- # bristol-clojurians (1)
- # calva (2)
- # cider (23)
- # cljs-dev (22)
- # cljsrn (2)
- # clojure (105)
- # clojure-bangladesh (1)
- # clojure-berlin (8)
- # clojure-dev (104)
- # clojure-europe (3)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (24)
- # clojure-russia (55)
- # clojure-spec (44)
- # clojure-uk (19)
- # clojurescript (58)
- # component (58)
- # cursive (3)
- # data-science (1)
- # datomic (27)
- # duct (6)
- # events (6)
- # figwheel-main (6)
- # fulcro (15)
- # jobs (3)
- # kaocha (5)
- # luminus (1)
- # music (1)
- # nrepl (2)
- # off-topic (24)
- # onyx (1)
- # pedestal (3)
- # protorepl (8)
- # re-frame (18)
- # reagent (39)
- # reitit (1)
- # remote-jobs (1)
- # ring (15)
- # rum (11)
- # shadow-cljs (5)
- # sql (8)
- # tools-deps (12)
- # vim (7)
I was reading datomic’s tutorial on transacting schemas referenced here: https://docs.datomic.com/on-prem/getting-started/transact-schema.html
But I notice in other sites or examples, there are two additional attributes specified that are not in the tutorial: :db.install/_attribute and :db/id
@fuentesjr those used to be required, but now are not
are those attributes no longer necessary, or do they simply have default values that can be overriden?
in every case db id should be tempid in :db.user/db partition and :db.install/_attribute should be :db.user/db
what those did was add the new attribute to the :db.user/db entity (entity id 0) on its :db.install/attribute attribute
so by default now all schemas are created in the db.part/user partition when those attributes are not specified?
Also, are the entity ids unique across all of the db or are they unique only within the partition they reside?
@fuentesjr I think so. It seems like partition control in general has fallen out of common practice. I'm not sure it's even possible in Datomic Cloud. I think I read somewhere that they found it wasn't being used much and may not be "worth its weight" in the API.
this was mostly an interface change (you no longer need to include those assertions in your tx data) not a functionality change
My understanding is that partitions are primarily a means of improving performance by controlling which of your datoms get indexed/cached "closer" to each other. I'm not sure if they have other functional/semantic implications.
they don't, but schema is supposed to go in db partition and I don;t think they changed that
I see. So by looking at the presense of :db.type and/or :db/cardinality, they store those datoms in db.part/db otherwise … they store them in db.part/user
This "best practice" in the Datomic docs might need to be updated. https://docs.datomic.com/cloud/best.html#optimistic-concurrency
I'm getting a java.util.concurrent.ExecutionException
containing an ExceptionInfo
with {:db/error :db.error/cas-failed}
. Is that how to detect CAS failures now?