Fork me on GitHub
#datomic
<
2018-11-02
>
Rustem00:11:36

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":"java.net.ConnectException: 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(Var.java:396)", "datomic.ion.lambda.handler.Thunk.handleRequest(Thunk.java:35)"]} 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.

csm00:11:50

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

steveb8n03:11:54

@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.

dangercoder05:11:58

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?

ro613:11:16

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?

eoliphant14:11:39

@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
dangercoder14:11:44

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

4
eoliphant14:11:42

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

eoliphant14:11:51

your 'poller' can be a lambda

❤️ 4
eoliphant14:11:04

that gets invoked via a cloudwatch event

eoliphant14:11:29

only issue there is that the minimum interval is 1 minute

dangercoder14:11:38

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.

eoliphant14:11:44

however there's a trick

eoliphant14:11:56

so there's a 'hack'

eoliphant14:11:04

to get around that if you need sub minute

eoliphant14:11:18

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

dangercoder14:11:51

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

dangercoder14:11:23

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.

eoliphant14:11:51

other alternative

eoliphant14:11:01

is to do it on your write side

eoliphant14:11:20

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

eoliphant14:11:46

but depends on your usecase

dangercoder14:11:51

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. 🙂

eoliphant15:11:55

yeah if that's the case

eoliphant15:11:03

is probably not what you want

eoliphant15:11:09

you can probably do something like wrap the transact api

eoliphant15:11:33

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

jaawerth20:11:33

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 😉

jaawerth21:11:09

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 ;_;

jaawerth21:11:20

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…

jaawerth21:11:32

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!