Fork me on GitHub
#datomic
<
2018-09-18
>
caleb.macdonaldblack01:09:01

In datomic on-prem, why does the transactor need the peer role? This is painful because I’d like multiple services/applications to be given different roles but the transactor only accepts one. Or am i confusing the peer server with a peer in an application? Is this role just for the peer server? Ideally I’d like to use the peer library over the client library so I don’t think I want to run a peer server.

johnj01:09:37

are you talking about AWS roles? but yes, confusingly, the peer server and the peer library are two separate things, if you don't want clients you don't need the peer server

caleb.macdonaldblack02:09:56

@lockdown- Yea AWS IAM roles. The transactor configuration requires a single peer iam role https://docs.datomic.com/on-prem/storage.html#dynamodb-transactor-properties

caleb.macdonaldblack02:09:24

But if I had two services/application with separate roles (I want to give permissions to different things but share datomic access) how would I set this if the transactor configuration only accepts one?

fmnoise08:09:46

Official docs https://docs.datomic.com/cloud/schema/schema-change.html say

You cannot change the :db/valueType of an attribute
but I found a workaround to achieve this via renaming. I had a :node/children which was EDN string and I migrated it to list of ref with 2 transactions:
[{:db/id :node/children
  :db/ident :node/legacy-children}]}
[{:db/ident :node/children
  :db/valueType :db.type/ref
  :db/cardinality :db.cardinality/many}]
It works just fine, but I worry what are downsides of this approach.

stuarthalloway12:09:12

@U4BEW7F61 changing the meaning of a name breaks existing users (rule 6 at http://blog.datomic.com/2017/01/the-ten-rules-of-schema-growth.html). That is the biggest downside.

fmnoise12:09:02

@U072WS7PE thanks for the answer, while I'm fine with that (meaning wasn't actually changed, it's the same data but now I just return it to client "as is" without clojure.edn/read-string, there are no datomic specific technical downsides, right?

mping15:09:19

Hi all, I’m getting a noob error when transacting:

java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.Named

mping15:09:27

this is on the logback log file

mping15:09:42

the transact call just says there’s a server error

mping16:09:56

nvmind, bad parinfer indentation

timgilbert19:09:33

Say, I upgraded my local dev transactor from 0.9.5561.62 to 0.9.5703 and now when I try to connect to it with a peer, I'm seeing this message:

org.h2.jdbc.JdbcSQLException: Remote connections to this server are not allowed, see -tcpAllowOthers [90117-171]

timgilbert19:09:40

Aha, look like that's it, thanks! I'll take a look.

timgilbert19:09:16

This is running inside a docker container. Has anything changed with regards to this? I didn't see anything obvious in the release notes