This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-19
Channels
- # announcements (9)
- # babashka (5)
- # babashka-sci-dev (23)
- # beginners (160)
- # calva (78)
- # cider (23)
- # clj-commons (2)
- # clj-kondo (5)
- # cljdoc (19)
- # cljs-dev (8)
- # clojure (54)
- # clojure-australia (1)
- # clojure-czech (2)
- # clojure-dev (17)
- # clojure-europe (8)
- # clojure-italy (8)
- # clojure-nl (2)
- # clojure-sg (3)
- # clojure-uk (4)
- # clojurescript (70)
- # community-development (8)
- # core-async (8)
- # cursive (7)
- # datahike (12)
- # datalog (22)
- # datomic (20)
- # events (1)
- # fulcro (43)
- # graalvm (92)
- # gratitude (5)
- # holy-lambda (77)
- # honeysql (1)
- # jobs (1)
- # lsp (111)
- # membrane (70)
- # nextjournal (13)
- # off-topic (73)
- # pathom (1)
- # polylith (8)
- # portal (32)
- # re-frame (3)
- # reagent (4)
- # reitit (5)
- # releases (2)
- # reveal (4)
- # xtdb (22)
How can I start Datomic (in-memory) within a JVM application (Java/Kotlin) for integration testing? Are there any docs regarding this?
in On-Prem: Use a database uri on the form "datomic:<mem://some-mem-db-1>" and make d/create-database etc just as if it was an external db with a transactor.
;; on-prem
(defn memory-conn
[db-name]
(-> (str "datomic:mem://" db-name)
(doto d/delete-database
d/create-database)
d/connect))
;; cloud
(defn memory-conn
[db-name]
(let [client (d/client {:server-type :dev-local
:system (str db-name)})]
(-> client
(doto (d/delete-database {:db-name (str db-name)})
(d/create-database {:db-name (str db-name)}))
(d/connect {:db-name (str db-name)}))))
(let [;; Do not be afraid to generate many names
conn (memory-conn (UUID/randomUUID))
{:keys [db-after]} (d/transact conn tx-schema)]
(do-thing {::conn conn} ...))
Also take a look at https://github.com/vvvvalvalval/datomockUpgrading Datomic Cloud storage will delete too many resources, why?
From 884-9095 to 936-9118, switching Reuse Existing Storage from false to true since this is this stack's first upgrade ever. This yields a very dubious change set, wherein important EFS, DDB and etc. resources are to be removed.
Continuing...
If I flip the argument to Reuse Existing Storage = false, then it yields a more reasonable changeset. It's as if it yields the reverse of what it should yield.
I manage several Datomic Cloud systems in different AWS accounts. An hour ago I upgraded my first environment. It yielded a 2-changeset like the last screenshot above. The upgrade went fine.
Why is it that this other AWS account's CloudFormation seems to read the reverse of my Restart/Reuse Existing Storage parameter?
It's now been one year that I track each Datomic Cloud release in a few AWS accounts. It's the first time I see the upgrade process propose to do the reverse of what we want in an upgrade.
This is one of our newest AWS accounts, and this CloudFormation stack's first upgrade. Before I came to update it, its Reuse Existing Storage was still at its pristine false value, and I obviously switched it true but the ChangeSet yielded showed me CF is about to delete my storage if I proceed. I suspect the new CF Yaml to react badly to our changing the Reuse Existing Storage parameter on a never-before-upgraded stack!?
The other account I successfully upgraded an hour ago already had its Reuse Existing Storage param set to true during last summer's update. And it went fine without proposing to delete my storage.
Thanks for any help. Should I proceed asking for the reverse of what I want so that I get what I truly want? A quick read of the CF template tells me this might be a bad idea, even though the change set then looks reasonable.
To help not duplicate efforts with Cognitects, please know that I submitted a support request (#3334).
For posterity's sake, we found out that since this is a new stack that was never upgraded before, the change set built is bigger (compared to the other stack that had already gone through an update). That's normal. So I applied the update as instructed and all went fine...
Why is it that this other AWS account's CloudFormation seems to read the reverse of my Restart/Reuse Existing Storage parameter?
This is not a datomic-specific question but rather a bit more general. I've been eyeing some of the RDF implementations from afar for a while, and I've finally wrapped my head around them over the last month or so. I've hit a point recently where I've started to think that RDF (and when I say RDF I specifically mean something like Datomic/XTDB flavors of RDF) can be used to model any type of data. So my questions to folks who are more familiar with it and have battle-tested it in the real world: 1. Where, if anywhere, does this approach fall down from your perspective? 2. What are the most important lessons that you wish you had learned earlier when taking this type of approach to domain modeling? 3. Do you think this type of approach can model any data domain? If so, is it actually the best fit for everything? Or are there situations in which it doesn't make sense to use.
I am not a Datomic expert, but have done several projects with it, and also worked for several years building RDF-based products. I find Datomic EAV to be a fantastic fit for things that are "mostly tabley" (entities that mostly have the same set of attributes but maybe sparse), but a little graph-y (particularly hierarchies). In general, I think those capabilities are extremely flexible for modeling a wide range of human information systems. For working with very structured data (columnar, aggregate star schema rollups, time series, etc) designed for specific access patterns and very high performance, those custom fit structures are probably going to be better than the relational approach. And on the other end, things that are very graphy (non-hierarchical networks), probably graph-first dbs have support for things like nearest-neighbor queries that would not be as good in Datomic.
this query
'[:find ?e
:in $ [?vs ...]
:where
(not (not [?e :some-card-many-attr-of-type-ref ?vs]))]
would mean something like "get me any entity ?e that is not related to any v
outside of the group ?vs", is that right? "exclude any ?e related to a v outside of ?vs"