Fork me on GitHub
#datomic
<
2016-03-04
>
tcrayford00:03:28

No TOAST here

isaac13:03:19

Should I prefer enumerated value or keyword?

tianshu15:03:51

After a query, I listen to tx-report-queue. How can I compute the difference between old result and new result, with the tx-data that is provided in tx? (PS. without re-run the query)

ljosa17:03:28

Which version of the couchbase-client library should I be using with Datomic 0.9.5302?

ljosa18:03:36

I see that 1.0.3 comes with the transactor, so I suppose that's the right one to use. The reason I'm asking is that we're having intermittent problems with connecting from Datomic peers to an otherwise well-behaved Couchbase 3.0.1-1444 cluster. The error messages look like this:

2016-03-04T16:48:40.35395 2016-03-04 11:48:40.352 WARN  c.c.client.CouchbaseConnection - Closing, and reopening {QA sa=prd-useast-couchbase-config-node-01.node.us-east-1.consul/10.51.155.229:11210, #Rops=1, #Wops=0, #iq=0, topRop=Cmd: 0 Opaque: 4 Key: pod-catalog, topWop=null, toWrite=0, interested=1}, attempt 0.
2016-03-04T16:48:40.35399 2016-03-04 11:48:40.353 WARN  n.s.m.p.b.BinaryMemcachedNodeImpl - Discarding partially completed op: Cmd: 0 Opaque: 4 Key: pod-catalog
2016-03-04T16:48:40.40825 2016-03-04 11:48:40.407 WARN  c.c.client.CouchbaseConnection - Node exepcted to receive data is inactive.  This could be due to a failure within the cluster.  Will check for updated configuration.  Key without a configured node is: pod-catalog.
2016-03-04T16:48:42.35671 2016-03-04 11:48:42.356 WARN  n.s.memcached.auth.AuthThreadMonitor - Incomplete authentication interrupted for node {QA sa=prd-useast-couchbase-config-node-01.node.us-east-1.consul/10.51.155.229:11210, #Rops=0, #Wops=2, #iq=0, topRop=null, topWop=Cmd: 0 Opaque: 5 Key: pod-catalog, toWrite=0, interested=8}
2016-03-04T16:48:42.35758 2016-03-04 11:48:42.357 WARN  net.spy.memcached.auth.AuthThread - Authentication failed to prd-useast-couchbase-config-node-01.node.us-east-1.consul/10.51.155.229:11210

alexisgallagher18:03:43

@tcrayford: thanks for the pointer re: TOAST. Didn't know this was what I was wondering about.

wei21:03:00

what’s a good way to a keep global config value in datomic? i.e. a property that only has one value

alexisgallagher21:03:04

Why not just define an attribute to name that config value and define its type, and then have a single entity with that attribute?

wei21:03:55

could you give me an example definition? still wrapping my head around the syntax

wei21:03:11

oh, I think I get what you’re saying. the lookup for that value would be annoying though, right?

alexisgallagher21:03:51

I'm still in the head-wrapping stage as well, so you should take my thoughts with a grain of salt.

alexisgallagher21:03:13

But..., basically there are two entities you want to create, I think.

alexisgallagher21:03:48

1. The schema entity which defines a new kind of attribute.. Let's say it's name (it's "ident") is :mysystem/config.

alexisgallagher21:03:10

You only need to create this one the database initialization stage, as part of the usual schema definition.

alexisgallagher21:03:15

Then, there's also,

alexisgallagher21:03:36

2. An entity which has no purpose except to have this attribute.

alexisgallagher21:03:58

When you change the system configuration, you would add/retract assertions about this second entity.

alexisgallagher21:03:17

I don't see why lookup would be any more or less annoying than lookup elsewhere in datomic.

alexisgallagher21:03:13

(first (d/q '[:find ?config-value :where [?e :mysystem/config ?config-value]] db)) might be right.. not sure off the top of my head.

alexisgallagher21:03:59

I'm just grabbing the first query result since I assume that in your application logic you enforce that there is only ever one entity holding this value.

alexisgallagher21:03:48

You could even give the entity an alias, and refer to it as :mysystem, if you wanted to, and then maybe you could get easier lookup by using (d/entity :mysystem). Not sure.

jgdavey21:03:47

For single-value-returning queries the . is probably more idiomatic: (d/q '[:find ?config-value . :where [?e :mysystem/config ?config-value]] db)

alexisgallagher21:03:32

@jgdavey: what is the . formally in the query grammar? it's news to me.

jgdavey21:03:58

find-scalar

alexisgallagher21:03:09

So datomic-free is directly available via maven. Is there also a way to download the datomic free transactor directly for non-interactive deployment, or is the only way to click-thru the EULA on the website?

wei22:03:56

@alexisgallagher: alias is a good idea, thanks