Fork me on GitHub
#datomic
<
2019-12-11
>
kosengan10:12:12

So, this is now a open question :) https://clojurians.slack.com/archives/C03RZMDSH/p1575947979130900 What are the most favourite DBs for Clojure ecosystem and community in general?

Luke Schubert12:12:17

The other day I was having an issue with running the transactor and console on windows due to java classpath sizes and I found a super simple solution so I wanted to drop it here in case it's useful for anyone else as of java 6 cp supports wildcards so you can remove the two for loops in ./bin/classpath.cmd and replace them with SET CP_LIST="bin;resources;lib/**;datomic-transactor*.jar"*

Adrián Rubio Morlote17:12:31

Hi! I'm kinda noobie on datomic, does anyone know the difference between "Production" and "Production 2" Topologies??

marshall17:12:12

@adrian169 that is an artifact of AWS Marketplace issues You should use whichever contains the latest release

😱 1
Adrián Rubio Morlote17:12:13

Also, I don't really know how to configure instances so they are not i3.large

marshall17:12:29

in the Production topology you can choose i3.large or i3.xlarge

marshall17:12:35

the Solo topology uses a smaller instance

Adrián Rubio Morlote17:12:00

Hmmm isn't there a way to use smaller instances

marshall17:12:22

i3.large is the smallest supported instance type in production topology

marshall17:12:42

for some additional information

johnj18:12:49

Is there a way to directly omit the :db/ident key in a pull expression for an "enum"? having only its value returned

johnj18:12:10

{:db/ident :green} => :green

favila19:12:40

No, it is not possible. You have to postprocess with e.g. clojure.walk

johnj20:12:08

just used update for this simple case, definitely going to need clojure.walk on the next one, thanks

John Miller19:12:43

I’m having trouble with upserts on entities with tuple identities containing a ref. The only way I can get upserts to work is to look up the entity id of the ref and use that in the query. Tempids work for the initial insert but then fail with an identity conflict. Lookup refs don’t work at all. And tuple does not appear to work in transact. Here’s a repro script:

(d/transact dt-conn {:tx-data [{:db/ident :example/r
                                :db/valueType :db.type/keyword
                                :db/cardinality :db.cardinality/one
                                :db/unique :db.unique/identity}
                               {:db/ident :example/id
                                :db/valueType :db.type/string
                                :db/cardinality :db.cardinality/one}
                               {:db/ident :example/ref
                                :db/valueType :db.type/ref
                                :db/cardinality :db.cardinality/one}
                               {:db/ident :example/multi
                                :db/valueType :db.type/tuple
                                :db/tupleAttrs [:example/ref :example/id]
                                :db/cardinality :db.cardinality/one
                                :db/unique :db.unique/identity}]})
(d/transact dt-conn {:tx-data [[:db/add "one" :example/r :one]]})
(d/transact dt-conn {:tx-data [{:example/ref [:example/r :one]
                                :example/id "foo"}]}) ; Succeeds once - Fine, need to include the identity tuple
(d/transact dt-conn {:tx-data [{:example/ref [:example/r :one]
                                :example/id "bar"
                                :example/multi [[:example/r :one] "bar"]}]}) ; Fails - "Invalid tuple value"
(d/transact dt-conn {:tx-data [[:db/add "ONE" :example/r :one]
                               {:example/ref "ONE"
                                :example/id "baz"
                                :example/multi ["ONE" "baz"]}]}) ; Succeeds once. Then fails - "Unique conflict: :example/multi, value [...] already held by ..."
(d/q '[:find ?e :where [?e :example/r :one]] (d/db dt-conn)) ; Put the resulting id in the next query
(d/transact dt-conn {:tx-data [{:example/ref [:example/r :one]
                                :example/id "qux"
                                :example/multi [<insert value here> "qux"]}]}) ; Succeeds upsert
Any suggestion on how to make this work?

dominicm21:12:01

I'm getting " handshake timed out" when connecting to a datomic free transactor using the datomic clojure client api:

Dec 11, 2019 9:18:41 PM org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector createConnection
ERROR: AMQ214016: Failed to create netty connection
javax.net.ssl.SSLException: handshake timed out
	at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source)
I vaguely recall there being some changes to all this, but I don't remember the detail.

dominicm21:12:20

I set encrypt-channel to false

steveb8n21:12:05

Q: I’m running Ions using the “connect on use” pattern when my app startup calls a component/start of my stack. My stack becomes unstable after a few CI deploys and I suspect that the lack of a component/stop call before the new stack is started is leaking resources such as aws clients. What is the recommended way to shutdown stacks during deploys? Is there a hook in one of the step functions used in deploy to address this?