This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-17
Channels
- # 100-days-of-code (4)
- # announcements (4)
- # aws (2)
- # beginners (88)
- # cider (1)
- # cljsrn (9)
- # clojure (126)
- # clojure-conj (4)
- # clojure-dev (8)
- # clojure-greece (1)
- # clojure-italy (37)
- # clojure-nl (3)
- # clojure-spec (13)
- # clojure-uk (91)
- # clojurescript (392)
- # clojurewerkz (1)
- # clojutre (10)
- # core-async (6)
- # cursive (5)
- # data-science (1)
- # datomic (41)
- # emacs (21)
- # events (1)
- # figwheel-main (52)
- # fulcro (2)
- # hyperfiddle (4)
- # jobs (3)
- # jobs-discuss (9)
- # luminus (3)
- # lumo (9)
- # mount (1)
- # nyc (1)
- # off-topic (73)
- # other-languages (6)
- # pedestal (8)
- # portkey (2)
- # re-frame (9)
- # reagent (8)
- # rum (17)
- # shadow-cljs (38)
- # sql (19)
- # tools-deps (18)
- # yada (4)
Is it recommended we use the peer? I have some old terraform that creates Datomic infrastructure for a peer. At first glance the docs seem to be in favour of using the client API these days. As far as I know though, querying in the client API is more limited than in the peer. Like for example the peer can run defined functions in data log queries. Is it fine to continue using the peer API and to be using this way?
I am going through the examples in the docs (https://docs.datomic.com/on-prem/query.html#function-expressions) and came across
(d/q '[:find ?celsius .
:in ?fahrenheit
:where
[(- ?fahrenheit 32) ?f-32]
[(/ ?f-32 1.8) ?celsius]] db 212)
which gives me a ClassCastException datomic.db.Db cannot be cast to java.lang.Number clojure.lang.Numbers.minus (Numbers.java:137)
Do you know why this could be happening? I hope it is just me that typed something in incorrectly.@cbillowes first arg to :in
clause when present needs to be data source (i.e. the db), so using :in $ ?fahrenheit
should fix that. (right now since db is first query arg and no data source is in the :in
query will use var db
for ?fahrenheit
Can I automate the creation of Datomic Cloud infrastructure? For example through bash or terraform? We want to be able to spin up infra without needing to navigate through the AWS Marketplace
I'm curious about this too
@U3XCG2GBZ I'm guessing you can use the template url provided in the cloudformation interface as a nested stack in a cloudformation template. Not sure if that url get's updated a lot. I'm assuming it shouldn't as it would mean there is a change in Datomic Ion configuration and you have to update anyway (=> getting a new url). That being said i'm curious for the official answer
It seems the public Datomic Ion template url is publically available (just did a test). This means the above is very likely to work
@U0FT7SRLP we understand we can do more in this area and await your experience reports!
@U0FT7SRLP Thanks for the response. That’s what I’m going to do. Pull that cloud formation template url and use it in terraform.
@U3XCG2GBZ @U072WS7PE Here's the code needed to automate via Cloudformation https://gist.github.com/jeroenvandijk/e92cf7333f6bbfee981accde4c9ec66f
For example: a service that needs to interact with an external service to create the proper response.
I see in the event example project that <!!
is used: https://github.com/Datomic/ion-event-example/blob/master/src/datomic/ion/event_example.clj#L106. Is this the recommended approach? Will you end up locking up the system in a high load situation?
That's what I figured. This seems like a pretty common use case and would certainly be a blocker for ours.
I’ve been following the tutorial for setting up datomic cloud, and I’ve gotten to where I want to (d/create-database client {:db-name "users"})
(def cfg {:server-type :ion
:region "eu-west-1" ;; e.g. us-east-1
:system "datomic-test"
:endpoint " "
:proxy-port 8182})
;; => #'datomic-test.core/cfg
datomic-test.core> (def client (d/client cfg))
2018
(d/create-database client {:db-name "users"})
ExceptionInfo Forbidden to read keyfile at . Make sure that your endpoint is correct, and that your ambient AWS credentials allow you to GetObject on the keyfile. clojure.core/ex-info (core.clj:4739)
datomic-test.core>
22:17 $ curl -x .$DATOMIC_SYSTEM.$
{:s3-auth-path "datomic-test-storagef7f305e7-1bpzuyaf5d-s3datomic-1wgl6uvtl9bei"}✔ ~/Documents/datomic-test
22:21 $
so however you setup your env vars / AWS credentials, you’ll need to make sure the env that you use to launch the REPL has them
whether that’s sourcing in your shell before launching or whatever your tooling supports
We need to associate some computed data with each successive database value, but I can't find a way to do it. It's needed for performance reasons.
We are using Clara Rules for checking database constraints for a Datomic on-prem system. Loading the whole database into Clara is too slow, so we want to incrementally add facts to Clara.