Fork me on GitHub

I have a questions about Datomic Ions. First of all I want to say that I like ideas behind this technology. As well as I like AWS lambda from a time when I met it. But I have a problem when I add a dependency “ buddy/buddy-sign {:mvn/version "3.0.0" }” to my project and including name spaces from this lib to my module (:require [buddy.core.keys :as keys] ) Before this my lambda works without problem on AWS cloud. After this It doesn’t work. It return misleading 502 error but AFAIU main problem that Datomic ions can not compile my lambda on AWS cloud because of dependencies conflicts. Also I got this not very useful stack trace: {"errorMessage":" Connection refused","errorType":"datomic.ion.lambda.handler.exceptions.Fault","stackTrace":["datomic.ion.lambda.handler$throw_anomaly.invokeStatic(handler.clj:24)", "datomic.ion.lambda.handler$throw_anomaly.invoke(handler.clj:20)", "datomic.ion.lambda.handler.Handler.on_anomaly(handler.clj:139)", "datomic.ion.lambda.handler.Handler.handle_request(handler.clj:155)", "datomic.ion.lambda.handler$fn__4075$G__4011__4080.invoke(handler.clj:70)", "datomic.ion.lambda.handler$fn__4075$G__4010__4086.invoke(handler.clj:70)", "clojure.lang.Var.invoke(", "datomic.ion.lambda.handler.Thunk.handleRequest("]} I try to use different workarounds but without success. I use last version of Datomic ions. As I found others inside this channel, who have similar problems. Quote “It was working fine as of 0.9.160 and no cheshire. The house of cards started collapsing with the introduction of cheshire, alas.” So my questions is this : Datomics Ions can not work with some libraries even with popular ones like “buddy”, isn’t it? Does anybody know when or how this problem can be resolved? IMHO Datomics Ions is not production ready without ability to work other libraries.


cheshire (jackson, actually) is a mine field generally with dependency conflicts; possibly you can force a version of cheshire or jackson that is compatible with datomic’s classpath


@rustem.zhunusov I got conflicts when I started as well. As @csm says, you need to fix these warnings from the push and that will fix the connectivity problems. In my case, the s3-creds lib caused connection problems. Once fixed, Ions works fine with many libs. I have 7 non-Datomic libs working well in my project.


I am writing to Datomic. After 1 transaction of a certain type is done, I want to query the database for transactions of this type (which some predicates). this will happen frequently. Would it be good to use the transaction-report queue for this, or do I have to have a poller running every X seconds?


For local dev purposes, do I need to set up a Peer even to work against datomic:, or is there a way of doing that directly from the Client lib?


@jarvinenemil just to confirm, are you using on-prem? the report queue stuff isn't available in Cloud. Beyond that, as is frequently the case, the answer is 'it depends'. We do a lot of this by annotating the transaction with an :event-type, but the usecases vary. We have some code that uses the report queue, but all of our newer stuff is in cloud. So in that case we have 'pollers' that read the transaction log, save their offsets, etc. In both of those cases though we're interested the linear, temporal stream of stuff that's happening. If your need is more general, you can also just poll with regular queries

❤️ 4

@eoliphant I am using Cloud, I guess polling it is 🙂.


so you can take advantage of AWS if that fits your usecase


your 'poller' can be a lambda

❤️ 4

that gets invoked via a cloudwatch event


only issue there is that the minimum interval is 1 minute


writing that up. thank you. I will have a lot of writes/reads per second in this part of the system, it's a game queue with different alternatives that i need to "query" on.


however there's a trick


so there's a 'hack'


to get around that if you need sub minute


it's a little clunky to me but it works lol


I'll consider that one, I want to have close to instant queue-pop so I will look around 🙂


I used Core-async for this stuff before but now with the additional parameters that i need to choose players from I need to do something else.


other alternative


is to do it on your write side


architecturally of course, it's not 'reactive' if you do it that way


but depends on your usecase


indeed, I will do some more research and try different things. I will build a game queue which batches different players based on their options with lightning fast speed. 🙂


yeah if that's the case


is probably not what you want


you can probably do something like wrap the transact api


and fire off messages or something once you get back a good tx


figure this is good a place as any: just wanted to give a heads up that there's a now-broken link to the strangeloop preconf at the bottom of the datomic site 😉


also I'm now sad that I missed it after tracking down the real URL, realizing it was in September, and seeing who the speakers were. It's all datomics fault ;_;


Oh, I suppose that WOULD be helpful lol

Alex Miller (Clojure team)21:11:40

ah, I see it - that’s dead now

Alex Miller (Clojure team)21:11:52

but we’re doing the same(ish) training the day before Clojure/conj!

Alex Miller (Clojure team)21:11:25

if you’re interested…


yeah this is a good time to get on it and see if I can get work to pay for it. I'm really bad about missing the boat on conferences.... thanks!