datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
2020-11-10T12:39:53.363700Z

“High Availability (HA) is a Datomic Pro feature for ensuring the availability of a Datomic transactor in the event of a single machine failure.” according to https://docs.datomic.com/on-prem/ha.html. “All Datomic On-Prem licenses are perpetual and include all features…” including High Availability for Failover according to https://www.datomic.com/get-datomic.html. Please clarify whether HA is included with Datomic Starter. Thanks.

jaret 2020-11-10T13:04:55.363900Z

Yes, you can use HA with a Datomic starter license.

1👍
souenzzo 2020-11-10T13:24:26.364200Z

there is docs about how to do permissions on datomic-ions? Last time I tryied there is no docs, my solution break the cloudformation and I get 1 day of downtime

xceno 2020-11-10T13:29:48.364400Z

It took me almost two weeks to get my initial setup up and running. I initially went with solo but upgraded to production later on. Anyhow, I have my own permission / auth system right now as ring-middleware. It provides the very basics, but if I find time I want/need to switch over to using AWS Cognito. From what I've seen in the forums there are some people using Ions + Cognito in production, but there aren't any docs or examples in the wild. At least I haven't found any, if you do, please let me know

favila 2020-11-10T14:15:12.368200Z

With the client API, is there any equally-performant alternative to seek-datoms to find a next-v in an :aevt index? (d/seek-datoms db :aevt :known-attr some-e) . I’ve tried index-pull with :aevt, but it requires :a to be cardinality-many (?!); Query with > and <= seems to not-work quickly (which I didn’t expect: I expected either too slow or error)

favila 2020-11-10T14:17:37.368300Z

Example use case: given a tx value (which may fall between actual existing tx ids), find the :db/txInstant of the same e or the nearest-next one. In this particular case you can use the log (although this seems less efficient), but I have other cases besides :db/txInstant where I do this in the peer api for performance.

jaret 2020-11-10T15:13:27.371200Z

https://docs.datomic.com/cloud/query/query-index-pull.html#aevt > :v must be `db.type/ref` and `:db.cardinality/many`

jaret 2020-11-10T15:13:39.371600Z

Is that what you meant with trying :aevt? ^

Carey Hay 2020-11-10T15:14:10.372200Z

Hello! Our organisation has recently migrated to kubernetes using Amazon EKS. We are running the datomic transactor inside a pod in k8s and are hoping to also create a cronjob to create database backups to s3 using the standard backup commands. Has anyone done this succesfully using IAM Roles for service accounts? https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html We are using these succesfully for other applications to negate the need to mount aws credentials files into pods, but datomic does not seem to be able to interact with the auth tokens that are created in each pod as tokens. According to the supported sdk list, an application requres the following: • Java (Version 2) — https://github.com/aws/aws-sdk-java-v2/releases/tag/2.10.11 • Java — https://github.com/aws/aws-sdk-java/releases/tag/1.11.704 The most recent reference to the aws sdk in the change log is here: https://docs.datomic.com/on-prem/changes.html#0.9.5561.50, citing "Peers and transactors now use version 1.11.82 of the AWS SDK". Depending on what sdk is used, it may or may not be supported!

favila 2020-11-10T15:15:20.372600Z

I mean I want to start matching (fuzzily) on e

favila 2020-11-10T15:15:46.372800Z

peer code: (-&gt; (d/seek-datoms db :aevt :db/txInstant tx) first :v)

favila 2020-11-10T15:15:54.373Z

how would I do that efficiently with the client api?

favila 2020-11-10T15:18:00.373300Z

The error I got using dc/index-pull was `Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58). :db/txInstant is not card-many, as required for :aevt`

favila 2020-11-10T15:19:50.373500Z

I see now the error message was just misleading, the problem is really that it’s not a ref attr

jaret 2020-11-10T15:28:20.373700Z

Yeah, I think index-pull is the answer here, but that error message is something I want to look at and I am going to talk with the team to see if there is a more efficient way that doesn't have the requirements of index-pull.

favila 2020-11-10T15:33:30.373900Z

I’m not sure how index-pull could be the answer, as I would need to pull the second element not the third

favila 2020-11-10T15:34:13.374100Z

I would want to pull from the e in the :aevt, not the :v

favila 2020-11-10T15:34:27.374300Z

(actually I don’t want to pull at all-I just want the e and v)