This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-02
Channels
- # aleph (1)
- # architecture (4)
- # beginners (39)
- # boot (12)
- # cider (25)
- # cljs-dev (3)
- # cljsrn (5)
- # clojure (175)
- # clojure-dusseldorf (1)
- # clojure-italy (13)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (52)
- # clojure-uk (110)
- # clojurescript (35)
- # data-science (2)
- # datomic (61)
- # editors (8)
- # emacs (2)
- # fulcro (7)
- # graphql (15)
- # hoplon (1)
- # hyperfiddle (3)
- # jobs (4)
- # jobs-discuss (12)
- # juxt (2)
- # lein-figwheel (6)
- # leiningen (35)
- # off-topic (4)
- # onyx (5)
- # parinfer (1)
- # pedestal (63)
- # re-frame (38)
- # reitit (7)
- # ring-swagger (7)
- # rum (2)
- # shadow-cljs (27)
- # tools-deps (10)
- # uncomplicate (16)
AWS novice question: Is there an easy way to start/stop my Datomic Cloud System?
e.g. When casually exploring on the weekends it seems silly to leave dev cloud services running 24x7
@olivergeorge I've been setting desired capacity in my EC2 Auto Scaling groups to 0. This shuts down the EC2 instances and brings costs down to 0. Setting desired capacity to 1 brings them up again.
Thanks that makes sense. I guess I should be able to do that using the AWS CLI in a makefile too.
Enter the Mr Miyagi of cloud services: https://gist.github.com/olivergeorge/d3d22e3d55d6f8b3179ff0bf4b49b149
I have a question about attribute aliases. Although I can transact multiple db/idents pointing at the same attribute entity the most recent one seems to get a 'most favoured status`, and the earlier ones seem to get hidden
when I query
(sort-by second
(d/q '[:find ?e ?a
:in $
:where [?e :db/ident ?a]]
db))
it only shows me the 'most favoured' db/identsalthough previous ones continue to work, I cannot find out what they are; I just have to know
hi @U793EL04V -- query against a history db to see retracted values
hi stu. I am trying to follow https://docs.datomic.com/on-prem/best-practices.html#use-aliases
so I have two db/idents pointing to the same attribute entity
I want both to work (and they do)
yes, and they can both be found in query via a history db
db/ident is cardinality one
ah right I see
thankyou
If you just want the db id for a (possibly old/replaced) ident, use datomic.api/entid
; to learn the "preferred" (current) ident use datomic.api/ident
with the old ident as an arg
Is there any way to have a single Ions-based application span over multiple AWS regions? With the old model of using Datomic (Cloud) and running my app separately, I could have a single Datomic instance in say US East 1, but then have multiple instances of my app (including the Datomic peer library) running all over the world, which would then each be able to cache read results from the DB locally and serve geographically nearby client requests faster
Another, more noobie question: can I develop an Ions app using an in memory datomic DB (i.e. "dev" storage) on my own machine for local dev, and then push it to the cloud afterwards?
@miridius no cross-region support at this time
Ions do not currently have any local storage, but the :server-type :ion
is designed for local dev: see https://docs.datomic.com/cloud/ions/ions-reference.html#server-type-ion and discussed in the video starting at https://www.youtube.com/watch?v=3BRO-Xb32Ic&t=668s
@stuarthalloway yeah I've seen that video already, it's great! That's what got me really excited about Ions. I can imagine that using the ion server type is useful in plenty of local development situations. But what about when you don't have an internet connection (or a crappy one)? Or a more likely scenario, what if you have a large test suite that you want to run frequently, and if those test read/write to the DB it's going to make the suite a lot slower.
Or maybe I'm just thinking about things the wrong way and haven't got my head around the Ions approach yet
So after thinking more about this I realized 2 things: the Datomic free edition can be used for offline, in memory development/testing, and if I export my tests as lambdas I could run them in the compute cluster directly. Both of those options solve the test suite latency dilemma, and the first one also solves the developing without an internet connection issue (happens more than you might think!). It made me wonder though, if it would be possible to include test execution as a step in the Ions deployment Step Program so that the code is only deployed if tests pass?
I noticed that the datomic.client.api is a protocol so Iām currently testing a testing impl of that protocol which uses Datomic-Free instead of the cloud connection. This should provide the local dev/test flow we all want.
there are a few behaviour differences that need to be adapted and some that need to be avoided but so far itās working well
Sounds interesting.
just hit a road-block with d/q. itās the only fn not behind a protocol. Iāll update as I try and get around it
lots of work to do but it proves the concept. thereās one important question remaining which Iāll ask Stu in a new thread
Hi, IĀ“m getting the following error when trying to push code for a Datomic Ion: $ clojure -A:dev -m datomic.ion.dev ā{:op :push :uname āhelloā}ā {:command-failed ā{:op :push :uname \āhello\ā}ā, :causes ({:message āShell command failedā, :class ExceptionInfo, :data {:args (āclojureā ā-Sdescribeā āā), :result {:exit 1, :out āInvalid option: -Sdescribe\nā, :err āā}}})}
that is telling you that clojure -Sdescribe
failed -- maybe you do not have Clojure command line tools installed?
@stuarthalloway Did brew upgrade clojure and everything worked as expected, thanks!
Using the Datomic Cloud client, I'm seeing errors like "Attempting to call unbound fn: #'datomic.client.api.sync/client". Any thoughts on why that might occur?
@dave.dixon what version of client?
client 0.8.54
That one occurred in a call to datomic.client.api/client
Yes. It's sporadic, and not always the same error. I've also seen something to the effect of "method db not found on connection", and another when transacting where the message is just "datomic.client.impl.shared.Connection". I need to check my logging to ensure that I'm getting the full chain of causes, perhaps.
SystemCFTVersion 397
@dave.dixon I suspect this is related to a code loading race condition issue; can you upgrade to the latest Cloud release/template (v 402)
@dave.dixon are you rolling instances (e.g ion deploy?)
@stuarthalloway Don't think so, no ions, just running the DB in the vanilla production topology.
@dave.dixon any chance you are racing with your own code?
@marshall I'll give it a try ASAP. That was my guess too, We're running an onyx cluster processing messages from Kafka, and these error seem to crop up early in the lifetime, when the onyx job starts and there's messages waiting to be processed.
@stuarthalloway What sort of scenario are you thinking of? It's possible, I suppose, and I'll take another look at the code. but I believe it's wired up so that all of the Datomic interactions are scoped to a single onyx task, clients and connections not being shared amongst different threads.
@dave.dixon if your code calls require from multiple threads you could be hitting the equivalent of https://dev.clojure.org/jira/browse/CLJ-2026
Clojure's ns macro marks the namespace loaded at the moment the ns form completes, so another thread requiring the namespace thinks it is loaded when it may still be load*ing*
symptom is symbols not present, seemingly at random
That sounds like a strong candidate.
@stuarthalloway Is the workaround to try and require the client namespace as early as possible?
@dave.dixon the workaround is a concurrency mechanism that blocks the system on initialization, e.g. a a delay or future
So after thinking more about this I realized 2 things: the Datomic free edition can be used for offline, in memory development/testing, and if I export my tests as lambdas I could run them in the compute cluster directly. Both of those options solve the test suite latency dilemma, and the first one also solves the developing without an internet connection issue (happens more than you might think!). It made me wonder though, if it would be possible to include test execution as a step in the Ions deployment Step Program so that the code is only deployed if tests pass?