This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-19
Channels
- # 100-days-of-code (5)
- # announcements (1)
- # aws (1)
- # beginners (112)
- # cider (135)
- # cljdoc (6)
- # clojure (111)
- # clojure-dev (8)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-sweden (3)
- # clojure-uk (152)
- # clojurescript (101)
- # datascript (14)
- # datomic (61)
- # editors (1)
- # emacs (29)
- # events (7)
- # figwheel (3)
- # figwheel-main (15)
- # fulcro (18)
- # funcool (2)
- # graphql (1)
- # juxt (2)
- # off-topic (51)
- # om (1)
- # overtone (28)
- # perun (2)
- # reagent (1)
- # reitit (6)
- # ring-swagger (5)
- # shadow-cljs (112)
- # spacemacs (49)
- # tools-deps (10)
- # unrepl (11)
- # yada (10)
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
https://github.com/Datomic/ion-event-example/blob/master/src/datomic/ion/event_example.clj#L27
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.
"datomic:"
I've tried several combination (aws_security_token, session_token, leaving it out). But no luck so far. The error I get is:
com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: 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)]
(try
(doseq [[k v] props]
(System/setProperty k v))
(f)
(finally
(System/setProperties p)))))
(with-system-properties
{"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] https://clojuredocs.org/clojure.string/starts-with_q
@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: https://forum.datomic.com/t/any-ideas-for-isolated-dev-environments-with-datomic-cloud/663
@jeff.terrell Have you looked at https://docs.datomic.com/cloud/operation/planning.html
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).
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
OK. Thanks for the sanity check. Not sure how I was estimating that so wrongly. 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?
For example, if I want to set a global uncaught exception handler (as recommended here: https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions), 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 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] https://search.maven.org/artifact/com.datomic/client-cloud/0.8.66/jar
[2] https://docs.datomic.com/cloud/releases.html#current
[3] https://github.com/ComputeSoftware/datomic-client-memdb/issues/2
For example, if I want to set a global uncaught exception handler (as recommended here: https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions), 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 https://docs.datomic.com/cloud/transactions/transaction-processing.html#timeouts)
Unable to deploy:
$ clojure -Adev -m datomic.ion.dev "{:op :push :uname \"jvm-init-test-1\"}"
{:command-failed "{:op :push :uname \"jvm-init-test-1\"}",
:causes
({:message "Map literal must contain an even number of forms",
:class RuntimeException})}
same error with $ clojure -Adev -m datomic.ion.dev '{:op :push :uname "jvm-init-test-1"}'
Let me know how it goes @robert.mather.rmm
no dashes: "{:op :push :uname \"jvminittest1\"}"
-> same fail
as keyword:
{:command-failed "{:op :push :uname :jvminittest1}",
:causes
({:message "Incorrect args for :push",
:class ExceptionInfo,
:data
#:clojure.spec.alpha{:problems
({:path [:uname],
:pred datomic.ion.dev.specs/name?,
:val :jvminittest1,
:via
[:datomic.ion.dev.specs/push-args
:datomic.ion.dev.specs/uname],
:in [:uname]}),
:spec :datomic.ion.dev.specs/push-args,
:value {:op :push, :uname :jvminittest1}}})}
-> Spec fail, probably the keyword in that position doesn't satisfy datomic.ion.dev.specs/name?
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
@joe.lane If I want to escalate this a bit more, do you think the dev forum or the Cognitect support case system is better?
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)
ok, now it's a for real problem: $ clojure -A:dev -m datomic.ion.dev '{:op :push}'
{:command-failed "{:op :push}",
:causes
({:message "Map literal must contain an even number of forms",
:class RuntimeException})}