Fork me on GitHub

we're seeing some exceptions during the compilation of an ion deploy. the instance terminates itself in this case and then we can deploy. it looks like it happens every other deploy. Anyone else have seen this?


maybe, the answer lies in using a different http lib for making requests. the ion-event-example uses cognitect.http-client


is there some documentation about that library? and since it's not in the dependencies, I assume it is available on ions by default?


Are session credentials support in the dynamodb connection string? E.g.

I've tried several combination (aws_security_token, session_token, leaving it out). But no luck so far. The error I get is: The security token included in the request is invalid.
This is telling me that AWS supports it, but I can't tell if Datomic forward this information.


Cool, found a working thing via system properties:

(defn with-system-properties [props f]
  (let [p (System/getProperties)]
      (doseq [[k v] props]
        (System/setProperty k v))
        (System/setProperties p)))))

            {"aws.accessKeyId" (.getAWSAccessKeyId credentials)
             "aws.secretKey" (.getAWSSecretKey credentials)
             "aws.sessionToken" (.getSessionToken credentials)}
           (d/connect uri))


Can anyone advise if it's more performant to use Java method calls in a :where clause or Clojure? Many examples I see online use Java but it's not clear what the reason is. e.g. [:find ?e :where [?e :person/name ?n] [(.startsWith ^String ?n "Jo")]] vs [:find ?e :where [?e :person/name ?n] [(clojure.string/starts-with ?n "Jo")]]


Or is it just for brevity because a function outside clojure.core needs to be fully qualified?


@cbowdon clojure.string/starts-with has been added in clojure 1.8 [see 1]. So these are probably old examples [1]


@jeroenvandijk Ah that makes sense, thank you


If anybody has figured out how to do isolated dev environments with Datomic Cloud in a way that you're satisfied with, I'd be interested in your thoughts here:


Yes, and I'm not sure that helps, but is there something in particular you're thinking about? Query groups maybe?


And also, are query groups only for the production topology? I couldn't figure that out from the docs (although maybe I'm just missing it).


Yes, query groups can help with some of that. Yes, production only.


OK. I'm thinking that's more than I can afford at the moment. I don't suppose y'all have any plans to include the client API in Datomic Free Edition, do you?


Although, now that I'm checking the price (using the estimator on AWS marketplace), it looks like it might be as little as about $1.50/day all-in for a production topology with query groups. As a sanity check, does that sound realistic to you? (Maybe it matters that I'm still in the free tier on this account?)


I think it’d be a bit more than that IIRC a “default” production topology with 2 compute nodes runs around $400 or so a month


infrastructure + software


OK. Thanks for the sanity check. Not sure how I was estimating that so wrongly. simple_smile Thanks for all the help, by the way.


I guess Ions users are hanging out here more than #ions-aws? Doesn't seem to be much activity there.


Is there a way to specify to Ions that you want a certain set of tools.deps aliases to be used when you push/deploy? I guess by default the JVM process+classpath is constructed from the top level deps.edn specification without any aliases merged in?


In Ions, is there a way to piggyback custom code on the validate step during deploy? For example, confirming that the equivalent of -main started without error?


Second. I'm wondering about the JVM init process in general with Ions.


For example, if I want to set a global uncaught exception handler (as recommended here:, which I'd normally do once in -main, what's the best place to do that in Ions?


I’ve been using the very entry-point function to do all sorts of global system setup and, wherever possible, memoizing things along the lines of the Datomic sample app.


I’m not pretty sure I like this approach so I’m monitoring whether it scales well.


I notice that the latest version of com.datomic/client-cloud on Maven is v0.8.66 [1], but that version is not listed on the releases page of Datomic Cloud [2]. Is v0.8.66 not an officially supported version? Asking because I encountered a problem with it [3] (which may not be its fault; I dunno). [1] [2] [3]


Does Datomic support SQL Server? The documentation includes three other sql databases.


For example, if I want to set a global uncaught exception handler (as recommended here:, which I'd normally do once in -main, what's the best place to do that in Ions?


a few hours ago our applications running on AWS lost their connection to datomic cloud, as did my ability to connect locally via the socks proxy. is there an easy way to debug this? we're getting the following error:

{:cognitect.anomalies/category :cognitect.anomalies/unavailable, :cognitect.anomalies/message "Total timeout elapsed",...
the docs describe this as a likely configuration error but nothing has changed locally or internal to the VPC.


(or the following.. but i'm not sure how to recover or why it killed our silo'ed applications


Unable to deploy:

$ clojure -Adev -m "{:op :push :uname \"jvm-init-test-1\"}"

{:command-failed "{:op :push :uname \"jvm-init-test-1\"}",
 ({:message "Map literal must contain an even number of forms",
   :class RuntimeException})}


same error with $ clojure -Adev -m '{:op :push :uname "jvm-init-test-1"}'

Joe Lane21:10:05

try without dashes in the uname OR remove the double quotes and try it as a symbol.

Joe Lane21:10:40

Let me know how it goes @robert.mather.rmm


Not so good...


no dashes: "{:op :push :uname \"jvminittest1\"}" -> same fail as keyword:

{:command-failed "{:op :push :uname :jvminittest1}",
 ({:message "Incorrect args for :push",
   :class ExceptionInfo,
                        ({:path [:uname],
                          :val :jvminittest1,
                          :in [:uname]}),
                        :value {:op :push, :uname :jvminittest1}}})}
-> Spec fail, probably the keyword in that position doesn't satisfy


Maybe it's the way my shell is escaping the string?


sorry, you said symbol


as symbol: "{:op :push :uname jvm-init-test-1}" -> same fail (odd number of forms) as symbol without dashes: "{:op :push :uname jvminittest1}" -> same fail


@lanejo01 If I want to escalate this a bit more, do you think the dev forum or the Cognitect support case system is better?

Joe Lane22:10:44

clojure -A:dev -m '{:op :push :uname "some-uname"}'

Joe Lane22:10:54

When I push an Ion, it looks like this

Joe Lane22:10:20

Note the single quotes and how i’m not escaping the double quotes.

Joe Lane22:10:34

Does this also not work for you? Because this works for me several times per day.


yep, that was my first attempt. I think it may be a shell issue. I'm running Bash on Debian on the Windows Subsystem for Linux (WSL)

Joe Lane22:10:41

Weird, because the first one you posted here contains escaped double quotes.


Yeah, I had tried a few by that time

Joe Lane22:10:59

what if you commit a WIP then push?


ok, now it's a for real problem: $ clojure -A:dev -m '{:op :push}'

{:command-failed "{:op :push}",
 ({:message "Map literal must contain an even number of forms",
   :class RuntimeException})}


@lanejo01 What is your com.datomic/ion-dev version?

Joe Lane22:10:14

Something tells me the issue isn’t in the library. 0.9.176 is the version.


I'm on "0.9.176" as well, which is also the one Stu used in the event example


I agree, just covering the bases


It's weird though, because I have pushed successfully before from this shell

Joe Lane22:10:55

What were the last 5 things you did before trying to push? Can you eval them in the repl and confirm they dont have typos?

Joe Lane22:10:08

Do you have a typo in your ion-config?


haha, yes I do.


@lanejo01 Thank you sir.

👍 4

Error message definitely could have pointed a bit better, but I still feel stupid...

Joe Lane22:10:03

Don’t feel stupid, happens to all of us.

💯 4