Fork me on GitHub

@lanejo01 I have not much experience with Clojure and Datomic, just have tried the tutorials and created the first AWS API Gateway. Just curious if there is a way on how I can push from Datomic to the client via Websockets just like when using Sente with Clojure (


Hi there. Who's got the best Dockerfile and Helm chart for Datomic Pro and wants to share them?

😪 4

Is it possible to augment the solo topology with an NLB to take advantage of HTTP Direct? Just ran into Java cold start on my startup project, and I’m not quite at the point that I can justify the prod topo cost. Obviously the NLB would only have a single target, but it might let me bypass lambda.

Joe Lane13:07:33

@cjsauer Set up a cloudwatch event to ping your lambda. It’s waaay simpler than I thought it would be.


@lanejo01 okay, that was plan B. I had a little deflambda macro in mind that could check for a “keep warm” header value. That way I could decorate all my ions with that short-circuit logic.


I’ll have quite a few lambda functions, so maybe I should write a “keep warm” lambda that pings all the others. Could register them in an atom as part of deflambda perhaps :thinking_face:


Doesn’t really solve the fact that cold starts affect every concurrent execution, but at that point I think the prod topo becomes viable anyway.


Actually ion-config.edn could just be read to find all the lambdas that need warming. Much simpler.

Joe Lane14:07:44

Do it in data, You can annotate the ion-config.edn however you want. Or make your own file.

👍 4

Any plans about fast/forkable memdb on datomic.client.api ?


I'm using datomic-client-memdb that uses datomic-free. But now with com.datomic/client-cloud {:mvn/version "0.8.78"} it do not work anymore datomock it is also a great tool but do not work on cloud 😞


There is docs about :server-type :local?


@plexus Does support Datomic Cloud? I couldn't find any information on it either way.


@shaun-mahood probably not. It's hard(and expansive) to foss developer access datomic cloud, once to test it, you need to pay aws infrastructure 😞 "datomic-peer" has a awesome feature: it's simple and accessible. Just (d/connect "datomic:") anyware and it's ready to develop tools "datomic-cloud" you need to setup AWS Machines, connect proxies, stay online (harder to run CI)... 😣


That's kind of what I figured - there's a lot of awesome things about running local Datomic, and the kind of things Metabase do seem pretty well geared towards it. Thanks for letting me know!


I can confirm metabase-datomic is (so far) for Datomic on-prem only.


as mentioned metabase-datomic uses the peer api, so it's not currently compatible with Datomic Cloud. I do think it's doable, and perhaps not even that much work, but I haven't looked into it so far. If there's commercial interest I'd be happy to look into it and make an estimate. The development so far has been funded by (@fdserr et al) who don't have a need for Datomic Cloud support at this point. There's still quite a bit that could be improved in general as well, so if more companies would be willing to pitch in this could be something everyone would benefit from.


Makes sense - nice to hear that Datomic Cloud sounds doable! I assumed it would be much harder without the peer api. Hopefully there will be enough commercial interest to keep improving things. Thanks for the answer!


What version of is in the {:url ""}?

Alex Miller (Clojure team)16:07:35

Probably none, that should be in maven-central


My release is not working, Alex.


{:deploy-status "ERROR",
 :message "Could not find artifact in datomic-cloud ()"}


This used to work...


Does this not work anymore?

(defn release
  "Do push and deploy of app.  Supports stable and unstable releases.  Returns when deploy finishes running."
    (let [push-data (ion-dev/push args)
          deploy-args (merge (select-keys args [:creds-profile :region :uname])
                             (select-keys push-data [:rev])
                             {:group group})]
      (let [deploy-data (ion-dev/deploy deploy-args)
            deploy-status-args (merge (select-keys args [:creds-profile :region])
                                      (select-keys deploy-data [:execution-arn]))]
        (loop []
          (let [status-data (ion-dev/deploy-status deploy-status-args)]
            (if (= "RUNNING" (:code-deploy-status status-data))
              (do (Thread/sleep 5000) (recur))
    (catch Exception e
      {:deploy-status "ERROR"
       :message       (.getMessage e)})))

Alex Miller (Clojure team)16:07:34

The error is misleading - it checks every repo but just reports the last error


I upgraded to 480--8770

Alex Miller (Clojure team)16:07:45

What version of tools.deps.alpha are you using?


Oh, I am using a new computer. How do I install tools.deps.alpha onto MacOS?

Alex Miller (Clojure team)16:07:05

Just back up and tell me from the beginning what you’re doing


Ok, I have a new MacOS laptop. I am pushing my code to Datomic Production topology for the first time since getting this computer.


Yes. The version is


I just changed tools.deps.alpha to 0.7.516.


Still doesn't work.

Alex Miller (Clojure team)16:07:27

could you humor me on trying something?


Of course!

Alex Miller (Clojure team)16:07:17

brew uninstall clojure
curl  > clojure.rb
brew install clojure.rb

Alex Miller (Clojure team)16:07:25

basically a forced downgrade to older version

Alex Miller (Clojure team)16:07:34

then try it and see if it works


That works! Thanks Alex.


I'm really liking the new tuple features, especially for defining composite keys. Thanks! One question, though. It appears that if you use a composite key and want to update it you'll need to explicitly add that key to the transaction after the entity has been initially installed. Here's an example:

;Relevant composite key in schema. Other fields (person, time, balance, are primitives with cardinality one)
{:db/ident       :person+time
 :db/valueType   :db.type/tuple
 :db/tupleAttrs  [:person :time]
 :db/cardinality :db.cardinality/one
 :db/unique      :db.unique/identity}
Now, given a connection I transact my schema and a single initial entry:
@(d/transact conn schema)
@(d/transact conn [{:person "Mark" :time #inst "2000-02-01" :balance 200}])
So far, so good. Now I want to correct my balance as of the above time:
@(d/transact conn [{:person "Mark" :time #inst "2000-02-01" :balance 100}])
I now get an error:
Syntax error (Exceptions$IllegalStateExceptionInfo) compiling at (src/datomic_playground/understanding_time.clj:61:1).
:db.error/unique-conflict Unique conflict: :person+time, value: ["Mark" #inst "2000-02-01T00:00:00.000-00:00"] already held by: 17592186045418 asserted for: 17592186045425
However, I can do either of these to update my entity:
;Works because I am explicitly creating the identity key
@(d/transact conn [{:person+time ["Mark" #inst "2000-02-01"] :balance 100}])
;Also works, as expected
@(d/transact conn [{:person+time ["Mark" #inst "2000-02-01"] :person "Mark" :time #inst "2000-02-01" :balance 150}])
Is this behavior (needing to explicitly create the id key after the initial transaction) expected? Is there a way to auto-imply the unique key after the first transaction?


Hi @U0JUR9FPH! A couple of thoughts here.


1. You can alway use the actual entity id, so you don't need to use any identity to perform an update. (I presume you know this but am including it for completeness.)


2 If you do want to identify an entity by a unique key, you must indeed specify that unique key (not its constituents). This is clean and unambiguous.


Hey @U072WS7PE, thanks for getting back to me! Yes, case 1 makes total sense (and perhaps I should have put that as a third "works" example for completeness. For anyone following the conversation this would be 17592186045418 in this particular case.). I was indeed looking at case 2. My intuition was that transacting two schema-compliant items with the same constituent elements that form a unique key would resolve to that unique key and either insert or update as appropriate. However, I do see your point that future updates could cause ambiguity. Easy enough to handle once you know the behavior. Thanks!

Alex Miller (Clojure team)16:07:29

@hadilsabbagh18 thanks, I will follow up with the datomic team (I suspect latest version of clj has changed assumptions ion-dev is relying on)


@alexmiller I appreciate the time you took to help me. I know you are very busy.

Alex Miller (Clojure team)16:07:24

well, I think I'm the one that caused it :)