Fork me on GitHub
#datomic
<
2016-12-01
>
gdeer8101:12:30

@ljosa because if you have an issue in the middle of the night and you call the support team and they ask you what storage you are using and you say "dev" they hang up on you and go back to sleep

gdeer8101:12:13

I'm not even being snarky, I literally heard that yesterday at the day of datomic training

marshall01:12:02

From the mouth of Stu Halloway

gdeer8101:12:28

I could have sworn it was Justin who said it, but either way, that's coming straight from the top

robert-stuttaford05:12:47

@ovan we used postgres at first because, quite frankly, we understood it. I’d use Dynamo from the start, if i did it again. as for transactors, i recommend using the official AMI, and not trying to do anything fancy to it (we ran a Datadog agent on ours and i think it interfered with clean instance self-termination). learn to read the cloudwatch metrics. @jaret @marshall i actually think there’s massive scope for some screencast training videos around that whole topic — how to understand what your transactor is telling you through metrics

robert-stuttaford08:12:22

@jaret typo a temporary cannot begin with a colon (:) character on http://docs.datomic.com/transactions.html#creating-temp-id

robert-stuttaford08:12:19

@jaret or @marshall, how interoperable is 0.9.5530 with older peers / transactors? do we have to upgrade them all together, or could we e.g. upgrade peers now and transactor later or vice versa?

jarppe09:12:37

@robert-stuttaford Just out of curiosity, why would you choose DynamoDB over Postgres now? I'm leaning towards Postgres at the moment exactly on the same reason.

jonpither09:12:19

with PG you don't have to worry about throttling and limits

robert-stuttaford10:12:00

@jarppe don’t want to have to worry about RDS instances, basically

casperc12:12:09

From the docs, when doing an import you need to request index and then gc-storage. After that typically, you want to do a backup (at least I do). But how does one wait for the gc-storage to complete? Is there an event in the log, or is there a better way? And is waiting for the gc to complete needed in the first place?

casperc12:12:20

And related to this, is there an overview of the events that can be logged by datomic, and what they mean? I can’t find any

robert-stuttaford13:12:41

@casperc you can review logback.xml in the transactor download

casperc13:12:16

@robert-stuttaford: I am not sure that tells me all that much. It lists some loggers, like datomic.kv-cluster, but not the events that can be thrown by that logger.

pleasetrythisathome13:12:09

is there a way to pass a variable as unbound so that nil values can be supported?

pleasetrythisathome13:12:26

passing nil and binding in :in throws

pleasetrythisathome13:12:38

(d/q [:find '[(pull ?e selector) ...]
         :in '$ 'selector (if id '?id '_)
         :where
         '[?e :job/job-id ?id]]
        (d/db conn)
        '[*]
        id)

pleasetrythisathome13:12:57

words but seems like there should be a more elegant way to handle nil than having to do all that quoting every time

pleasetrythisathome13:12:36

but the following doesn’t work. assuming because ?id is actually bound to ‘_ instead of being unbound

pleasetrythisathome13:12:45

(d/q '[:find [(pull ?e expr) ...]
        :in $ expr ?id
        :where
        [?e :job/job-id ?id]]
      (as-db conn)
      '[*]
      ‘_)

robert-stuttaford13:12:30

better to just write two queries

robert-stuttaford13:12:25

they’re semantically different. one is; find me X where Y. the other is find me X.

pleasetrythisathome14:12:37

alright, i get that argument, seems redundant though

robert-stuttaford16:12:48

@pleasetrythisathome datalog caches query compilation based on that first arg so there’s a perf benefit 🙂

pat16:12:38

when i try to connect to my running peer-server I get :cognitect.anomalies{:category :cognitect.anomalies/fault} , anybody have an idea what's going on?

timgilbert16:12:21

Say, given a possibly erroneous lookup reference like [:user/id 42], is there an easy way to validate that it points to a real entity short of something like (try (d/entity lookup-ref) (catch ....))?

timgilbert16:12:02

Answering my own question, looks like (d/entity) returns nil if :user/id is a valid attribute, and throws IllegalArgumentExceptionInfo if it is not

jaret16:12:15

@robert-stuttaford Thanks for catching the typo. In terms of interoperability you can upgrade piecemeal as described in the docs. http://docs.datomic.com/deployment.html#upgrading-live-system

jaret16:12:27

We still have the same compatibility breaking releases:

jaret16:12:38

0.9.4609 (2014-03-13) 0.9.4470 (2014-02-17) 0.8.3705 (2013-01-09

jaret16:12:36

So you can upgrade the peers and transactors in any order you choose as long as its not on one of those ^ releases

robert-stuttaford16:12:17

excellent thank you @jaret!

timgilbert21:12:23

Say, does the in-memory database operate in a different thread or something? I'm seeing some seemingly non-deterministic behavior where in a test I create two entities and then validate that some metadata I attached to the transactions is present

timgilbert21:12:21

Most of the time it works, but every now and then my new transactions don't appear in the history. Adding a (Thread/sleep 1000) to the test seems to have stabilized it, though

timgilbert22:12:54

On an unrelated note, looks like there's a typo in the docstring here: http://docs.datomic.com/clojure-client/index.html#datomic.client.admin/list-databases Async, sell alos datomic.client namespace doc.

timgilbert22:12:42

Think it's meant to be see also datomic.client...