Fork me on GitHub
#datomic
<
2018-12-10
>
benoit00:12:23

@idiomancy The logic makes sense to me. As for performance, I'm not sure. You could try to separate the queries to see for yourself. You could get all the events representing when the links were issued and then get the related events in two other queries. But I'm not sure that would necessary speed up anything. I would be interested to know what you find.

idiomancy00:12:41

hmm. I feel like I must be missing something.

idiomancy00:12:31

I guess they are referring to separate groups of entities :thinking_face:

benoit01:12:59

Oh you might have a logic issue in the second or clause. The ?session var is used only once.

idiomancy01:12:35

mein got! 😱 good catch!

idiomancy01:12:07

hahaha, interesting! yeah, you actually made me realize that those joins are superfluous!

idiomancy01:12:01

it doesn't matter that ?e2 has a session in the second case or indeed or that ?e has a magiclink in the first case!

benoit01:12:32

You also likely don't need the tid, you can just join on the ?e events you're looking for.

arnaud_bos12:12:30

If anyone wants to help, I'm still struggling with the datomic getting-started guide. I've finally retrieved datomic-pro dependency from the repo (using leiningen, deps still doesn't work) and now I'm seeing a weird exception when opening my repl: I've setup the smallest repro case I could here: https://github.com/arnaudbos/thisisnotalovesong This is basically just

(require '[datomic.client.api :as d])
(def cfg {:server-type :peer-server
          :access-key "myaccesskey"
          :secret "mysecret"
          :endpoint "localhost:8998"})
(def client (d/client cfg))
And then java.lang.IllegalArgumentException: Unable to load client, make sure com.datomic/client is on your classpath

mping13:12:29

@arnaud_bos I guess you are missing the datomic client lib

thegeez13:12:20

@arnaud_bos the client lib to connect to a running datomic instance is a separate library: com.datomic/client-pro {:mvn/version "0.8.28"} https://docs.datomic.com/on-prem/getting-started/connect-to-a-database.html

arnaud_bos13:12:17

Ah, I see, I did mix info from the getting started guide and from the http://my.datomic.com/account page...

grzm15:12:51

I’ve run into an issue running (datomic.ion.cast/initialize-redirect :stdout) on CIDER. Works when redirecting to :stderr or to a file. I’ve posted a repro case in the hopes someone with more CIDER-fu might be able to figure it out more quickly than I can: https://github.com/grzm/cider-ion-cast-stackoverflow (Also posted in #cider)

m_m_m15:12:09

Hi all. Am I right that Datomic in a free version is only based on memory not SSD?

benoit15:12:48

It only supports local storage (disk). The PRO starter supports all storages.

m_m_m15:12:51

do you know what is the minimal price for the pro version? I can't find it on their site. There is only some AWS calculator.

joshkh18:12:03

my Ions lambdas are returning the following:

java.net.ConnectException: Connection refused
and my local SOCKS connection to my cloud instance is returning the following stack trace. any clues?
:cognitect.anomalies/category :cognitect.anomalies/fault, :cognitect.anomalies/message SOCKS4 tunnel failed, connection closed, :cognitect.http-client/throwable
#error {
 :cause SOCKS4 tunnel failed, connection closed
 :via
        [{:type    java.io.IOException
          :message SOCKS4 tunnel failed, connection closed
          :at      [org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection onFillable Socks4Proxy.java 165]}]
 :trace
        [[org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection onFillable Socks4Proxy.java 165]
         [org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded AbstractConnection.java 281]
         [org.eclipse.jetty.io.FillInterest fillable FillInterest.java 102]
         [org.eclipse.jetty.io.ChannelEndPoint$2 run ChannelEndPoint.java 118]
         [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill runTask EatWhatYouKill.java 333]
         [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill doProduce EatWhatYouKill.java 310]
         [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill tryProduce EatWhatYouKill.java 168]
         [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill produce EatWhatYouKill.java 132]
         [org.eclipse.jetty.util.thread.QueuedThreadPool runJob QueuedThreadPool.java 762]
         [org.eclipse.jetty.util.thread.QueuedThreadPool$2 run QueuedThreadPool.java 680]
         [java.lang.Thread run Thread.java 844]]},
:config {:server-type :cloud, :region .., :system .., :query-group .., :endpoint http:// entry.. /, :proxy-port 8182, :endpoint-map {:headers {host entry..}, :scheme http, :server-name entry.., :server-port 8182} } }

marshall19:12:53

@joshkh if you’re using ions your server type should be :ion not :cloud

joshkh19:12:26

starting a thread because... slack! i'm seeing a CloudWatch alarm for ConsumedReadCapacityUnits <750 for 15 datapoints, and ConsumedWriteCapacityUnits < 150 for 15 datapoints

joshkh19:12:33

and a cliff edge in the metrics that went from N capacity units to 0.

marshall19:12:21

The CW alarms for capacity are not relevant. they’re used by autoscaling policies internal to AWS (i.e. dynamodb) to trigger scaling up or down

joshkh20:12:10

ah, that's good to know. thanks Marshall. i'll comb through the logs and look for something useful. nothing in the local or remote config has changed - things just stopped working, although i know that another dev has been running some transactions (but no config changes). we had a similar problem a few months ago when our :cloud went down for 24 hours until we solved it by upgrading from a very early release to the split compute/storage stacks.

marshall20:12:23

What version and what deployment *(solo or prod)

marshall20:12:48

Also, can you take a look at your CloudWatch dashboard for that system and see what the instance CPU usage looks like?

joshkh20:12:27

is it okay if we take it to a DM for privacy reasons? happy to post any useful results after. 🙂

joshkh19:12:25

hmm, it is :ion in my code despite what the exception says.

joshkh19:12:28

and i'm seeing channel 2: open failed: connect failed: Connection refused in my proxy connection

joshkh19:12:58

i noticed the problem locally, then hit the remote ions via my API gateway and saw they were down as well without deploying any changes. i can't say for sure but it feels like something tipped over.

marshall19:12:44

have you committed and pushed your ion code? is it possible you’re running code that is using an older config?

marshall19:12:26

if not, i would look in your CloudWatch Logs in the log group named datomic-<yourSystemName>

marshall19:12:35

and see if the ions are firing and reporting any errors there

stijn09:12:17

nice release! preloading databases during deploy is a big improvement to us

stijn09:12:43

what is considered an 'active database'?

ro614:12:53

This is great stuff! The longer CodeDeploy timeout means I can switch back to using Mount (which I like for development reloading) and still eager load things like the db connection.

grzm23:12:44

@jaret Does that include an update of the Cognitect HTTP library to allow the use of the new (wonderful) AWS API in Ions as well? @marshall indicated that might be in this version. (Please say yes! Please say yes!)

grzm23:12:20

I think if you look out your window towards the upper midwest you’ll see the glow from my beaming smile 🙂

😂 8
marshall23:12:24

Yes, i see it shining through the foot deep snow drifts in NC :D

ro614:12:53

This is great stuff! The longer CodeDeploy timeout means I can switch back to using Mount (which I like for development reloading) and still eager load things like the db connection.