This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-27
Channels
- # beginners (43)
- # boot (1)
- # cider (7)
- # cljdoc (10)
- # clojure (110)
- # clojure-boston (1)
- # clojure-finland (2)
- # clojure-italy (19)
- # clojure-losangeles (1)
- # clojure-new-zealand (1)
- # clojure-nl (4)
- # clojure-spec (34)
- # clojure-uk (163)
- # clojurescript (136)
- # code-reviews (1)
- # component (13)
- # cursive (18)
- # datomic (99)
- # emacs (14)
- # events (4)
- # fulcro (14)
- # hoplon (15)
- # hyperfiddle (3)
- # jobs (3)
- # jobs-discuss (1)
- # lein-figwheel (10)
- # onyx (1)
- # pedestal (8)
- # re-frame (5)
- # reitit (4)
- # rum (1)
- # shadow-cljs (317)
- # spacemacs (24)
- # specter (9)
- # sql (2)
- # tools-deps (6)
- # yada (3)
After following the tutorial I just get connection refused when trying out api gateway with a ring handler š
Is there a way in code to tell if an Ion is deployed or not? Curious how others are handling configuration in dev vs prod.
@kenny you could try invoking it using AWS CLI. that would verify itās deployed. but it doesnāt seem like this is really your question. can you elaborate?
Iām curious because Iāll be setting up the same environments in the coming weeks
My application configuration depends on the environment it is running in (dev/qa/prod). I donāt see anyway to parameterize the deployment like that.
We have a release in the works to deliver params for deployment. Weāre currently working with AWS to get it out. I donāt have a timeline, but weāre going to be delivering parameterized deployment.
Iām wondering about that also. hence my earlier question about CI setup. If you look at the Ion lambdas there are env variables there so that seems like a good way to do this but not sure how to populate those from code.
it seems like the AWS Params store is part of the answer for this https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html
thatās what Iām using at the moment. I tagged my Datomic Cloud deployment with an ENV tag, and use that to ārootā my stuff in parameter store
@stuarthalloway I think the Datomic Ion tutorial could be improved by including a sample apigateway cloudformation template in the repo. It'd provide a more complete picture of how to deploy an app and potentially save some pain for potential users who are less familiar with AWS.
Has anyone seen this in their ion logs? "Message": "java.lang.StackOverflowError, compiling:(riddley/walk.clj:29:37)",
There's a good chance this is the same issue I had this week. Solo has low memory and classpath problems get masked by these stackoverflow errors.
The problem is not in the walk NS. Most likely O E of the libs you see in the push result warnings is the case. Try commenting them out one by one. Not great but worked for me
instead of commenting them out, change your local deps to match the warnings and see what happens locally
Ok. So I altered my deps.edn to match the warnings, spin up a local repl, and require the namespace which contain the ion functions. Everything works perfectly.
My deps.edn
currently looks like:
{:paths ["backend" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.9.0"}
com.datomic/ion {:mvn/version "0.9.16"}
ring/ring-core {:mvn/version "1.7.0-RC1"}
ring/ring-json {:mvn/version "0.4.0"}
email-validator {:mvn/version "0.1"}
clj-mailgun {:mvn/version "0.2.0"}
crypto-password {:mvn/version "0.2.0"}
danlentz/clj-uuid {:mvn/version "0.1.7"}
clojure.java-time {:mvn/version "0.3.2"}
commons-codec/commons-codec #:mvn{:version "1.10"},
com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.9.5"}}
:mvn/repos {"datomic-cloud" {:url ""}}
:aliases
{:dev {:extra-deps {com.datomic/client-cloud {:mvn/version "0.8.54"}
com.datomic/ion-dev {:mvn/version "0.9.175"}
ring/ring-jetty-adapter {:mvn/version "1.7.0-RC1"}
org.eclipse.jetty/jetty-server {:mvn/version "9.4.9.v20180320"}
org.eclipse.jetty/jetty-client {:mvn/version "9.4.9.v20180320"}}}
:test {:extra-paths ["tests"]
:extra-deps {expectations {:mvn/version "2.2.0-rc3"}}}}}
I'm trying to setup my ring app for api-gateway integration, and my datomic node just crashes. Can't re-produce it localy š
I know this is the Clojurians workspace, but anyone here knows if it's possible to use the client (not the peer) in Java? And, if so, where I can find some documentation on that?
Thanks, @marshall. I guess there are no docs around the API used by the clients, except for (maybe) the Clojure client's source code, right?
that is currently correct; we plan to publicize the client wire protocol once itās completely finalized
the API has remained pretty stable, so the java peer itself hasnāt changed much, but On-Prem is definitely still updated and supported
I'm curious about the 2^20 limit for schema attributes as described: https://docs.datomic.com/cloud/schema/schema-limits.html . Is that per database or per cluster (transactor, storage, peers)?
Hey folks - Weāre using Datomic Cloud in production topology. Our database is about 450m datoms and weāve started to receive āBusy rebuilding indexā responses from the transactor. Some googling led me to an earlier #datomic conversation that indicated we are pushing too much data into Datomic. How would I go about debugging this problem? Is this a transactor resource problem or too few DyanmoDB resources or something else entirely?
per database in both I belive @mtbkapp - however, are you likely to reach that? that would be a rather large DB if so
hey @marshall I had a problem I hoped I could get your advice on: I have an attribute that I wish I'd added a :db/unique :db.unique/identity
to, but it's too late as there are multiple values in the current set of database assertions
right, I was think about a case where users can create "custom fields" for entities. I think there are at least two ways to do this. 1) using datomic attributes directly (with additional constraints for security and what not). 2) modeling them using datomic entities, which turns it into something like a meta data model inside the datomic meta data model.
Thereās a good discussion of some approaches here: https://groups.google.com/forum/#!searchin/datomic/dynamic$20schema%7Csort:date/datomic/p3ZACQXnhd0/KexSo_AVBAAJ
retracting those multiple values doesn't work, but I think I found another way: I renamed the attribute :old-attribute-name
and asserted the attribute anew with the unique constraint, and thereafter one has only has the small inconvenience of having to specify the attribute in one's queries (to prevent assertions for the old one appearing) I have to assert the latest values of the old attribute on the new one
but what I wondered was, when asserting those values of the old attribute to the new one, is it possible to retain their txInstants ?
as though they had been asserted back when the old ones had been ?
if so, This may be related to a known issue (where you canāt retract :db/unique on an attr). we are working on a fix for that
@t.augusto here is good; the Datomic forum is also good
also, the Datomic support channel (http://support.cognitect.com) if you have a paid license
@marshall ah - I tried retracting until it was unique but it didn't work - I'll try again tomorrow
yes it's on Cloud
if you canāt get it to work, let me know, but hopefully the fix for retracting unique also fixes that
ok thank you!
Ok, @marshall, here it goes: I managed to create a docker composition, with the transactor
(pro starter) + console
+ app
(my java app). The console
is working fine, but I canāt get the app
to connect to the transactor
. I changed the logback.xml
to redirect the log messages to stdout
, so that it shows in my regular docker logs. The snippet (on itās way) is what it looks like in the transactor
and app
when the app tries to connect.
you need to set the values for HOST and/or ALT_HOST to addresses that the peer instance can resolve as the transactor
well, ALT_HOST=transactor
, which is exactly the name of that service inside the compositionā¦ š
Per the transactor
log:
transactor_1 | 2018-07-27 19:53:46.327 INFO default datomic.lifecycle - {:tid 24, :username "HgWS7pDswz79iMxZZKUEGfhle+9ggGa4PSSdxeZlhBY=", :port 4334, :rev 4852, :host "0.0.0.0", :pid 1, :event :transactor/heartbeat, :version "0.9.5703", :timestamp 1532721226326, :encrypt-channel true}
My pom.xml
:
<dependency><groupId>com.datomic</groupId><artifactId>datomic-pro</artifactId><version>0.9.5703</version></dependency>
also, you said the console works fine - are you able to connect it and see a DB, etc?
(can you see the screenshot, despite of this slackbot warning about āno storage space leftā?)
is it possible you have a conflicting dependency that is overriding something like netty?
Here is how Iām trying to connect:
public Connection getDatabaseConnection() {
String uri = "datomic:
Peer.createDatabase(uri);
return Peer.connect(uri);
}
Iād need to check for those conflictsā¦ Maybe spring boot is also pulling netty, not sure.
Iāll have to do some more looking - may not be able to discuss with the team until Monday
If you have Clojure on the docker system running your app, Iād be interested if you could connect from a REPL
Iām just trying to evaluate if it fits our project needs, before getting deeper into budget approvals and stuff.
My goal is to, unfortunately, create an API layer on top of it. Our app language is not supported (peer library nor client) so I donāt see much of an alternative.
(btw, @marshall, I just tried the enforcer:enforce
command (from the maven-enforcer-plugin
) and it reports no other conflict than datomic-pro
s own dependency on both com.google.guava:guava:18.0
(direct) and com.google.guava:guava:19.0
(through Artemis related packages))
I will try adding Clojure to the mix and experiment with the REPL. Just not really fluent on Clojure š
you should be able to follow this https://docs.datomic.com/on-prem/dev-setup.html#create-db
Is there any difference in the query results obtained using or
vs, or-join
, or is or-join
more of a hint for the query compiler?