Fork me on GitHub
#datomic
<
2018-03-20
>
dominicm07:03:45

> Specify a unique name for aws-cloudwatch-dimension-value > https://docs.datomic.com/on-prem/aws.html Should this be unique across re-deploys? Or just globally across deploys in the environment?

dominicm07:03:06

> The ensure-transactor command will create the necessary AWS constructs, There is limited permission for creating things on AWS. What permissions are needed for ensure-transactor? What constructs will it create, can I create them myself? I'm not using the cloudformation template. I tried running it, but I got java.lang.IllegalArgumentException: No method in multimethod 'ensure-transactor*' for dispatch value: :sql which may be a bug, or may mean I don't need to run it.

dominicm07:03:58

I only have 13 metrics, not the full list provided at https://docs.datomic.com/on-prem/monitoring.html#sec-5 this might just be because this is only staging, and there isn't much activity. I wanted to check though. This is now up to 20, but not quite as high as the list, but I assume it will go up over time.

Petrus Theron08:03:44

How are keywords stored in Datomic? I assume as strings, but cast to keyword in any language that supports it based on the schema. Are there are length limits or performance implications of using keywords vs strings?

val_waeselynck08:03:43

I guess that's an implementation detail, but you can have a look at Fressian. Note that in-memory representation may differ from storage representation (and be more relevant to you!)

Petrus Theron10:03:17

If there are performance implications, then it's no longer a detail. My understanding is that it's like a string that gets cast to the caller's native keyword type, if one exists? I use EDN wherever possible.

favila17:03:22

they are stored as a tagged pair of strings

favila17:03:39

performance implications are likely minimal or irrelevant

marshall13:03:28

Yes, CloudWatch custom metrics only show up once they’re “used”. If, for example, you haven’t ever had an indexing job you won’t see the CreateEntireIndexMsec metric.

dominicm15:03:11

@U05120CBV how long until I get a datoms count metric?

dominicm15:03:11

I was quite surprised that one hadn't showed up yet.

marshall15:03:21

There is a :Datoms metric reported on every indexing job

dominicm15:03:12

I see, so I'll get that as often as indexing happens.

dominicm15:03:43

How often is that? I haven't seen it since I deployed on the first message above ^

marshall15:03:22

an indexing job starts when the memory index reaches mem-index-threshold

marshall15:03:34

if you want to force one you can call request-index

dominicm16:03:35

I see. This is staging, so it's probably not hit that threshold all day 🙂. I'll watch for it in prod.

marshall13:03:31

Regarding the unique name of the CW dimension, that’s entirely up to you. CW metrics are aggregated by dimension name

marshall13:03:49

so if you want the metrics to be continuous across re-deploys, then use the same name

marshall13:03:11

if you want them separated in CloudWatch choose different names

dominicm15:03:58

ah, that wasn't clear to me the relationship between these things. I've already done the permissions I want, so I'm golden. I don't want S3 log rotation, as I've updated the logback to point at journald, which then also goes into Cloudwatch 😛

jaret15:03:57

@petrus What language are you working with? Datomic on-prem only supports clojure and java.

jaret15:03:20

then Keywords are stored as keywords and the keywords are stored in memory.

jaret15:03:41

What are you about to do where you’re concerned? Make a bunch of keywords?

Alex Miller (Clojure team)15:03:05

keywords are made of strings. the keywords are interned (so any particular keyword only exists once in a Clojure runtime)

JJ16:03:55

is this outside VPC?

amarjeet16:03:32

I am creating Uberjar at my local machine so that I can use the uberjar for Docker container in aws beanstalk

JJ16:03:18

http://entry.<system-name>.<region>.http://datomic.net:8182/ only works inside the VPC

JJ16:03:53

your DNS can't resolve it locally

JJ16:03:52

I would put the cfg inside a function

amarjeet16:03:55

So, should I create Uberjar without the :endpoint ? Will beanstalk work? My beanstalk environment is in the same vpc as datomic cloud

JJ16:03:36

no, you need the :endpoint

JJ16:03:20

put your cfg inside a function so it doesn't get call when creating the uberjar

JJ16:03:34

only when you start your app

amarjeet16:03:55

okay, then, should this function be called in the -main function

JJ16:03:58

and yes, inside the same VPC that url should resolve

JJ16:03:24

that's up to you

JJ16:03:31

where you want to call it

amarjeet16:03:39

okay, let me try

amarjeet17:03:03

@devicesfor yes, now Uberjar created. Thanks for this 🙂

JJ17:03:22

@amarjeet where you AOTing?

amarjeet17:03:22

:uberjar {:aot [my-app.server]}

amarjeet17:03:41

and :main ^{:skip-aot true} my-app.server)

amarjeet17:03:41

the standalone jar is not getting recognized (its not recognizing any docker file) in beanstalk

amarjeet17:03:27

locally the docker image is running

Petrus Theron10:03:17

If there are performance implications, then it's no longer a detail. My understanding is that it's like a string that gets cast to the caller's native keyword type, if one exists? I use EDN wherever possible.