Fork me on GitHub
#datomic
<
2017-02-20
>
marshall14:02:48

@ezmiller77 Peerserver can’t delete or create databases. Since a single peerserver could be connected to multiple transactors/backend storages at once the semantics aren’t clear what ‘create’ would mean - which backend should it use for example?

ezmiller7715:02:52

@marshall thanks, I was starting to suspect that that was the case.

ezmiller7715:02:34

Question, though, the client api has these functions available in datomic.client.admin. Why would these methods exist if they can’t be used. Is there another way t ouse the client library other than in combination with the peer-server?

marshall16:02:03

Not at present

nottmey17:02:35

“composite keys” seems to be a heavily discussed topic, I read the threads from 2015-16 on how to solve individual issues with custom implementation. Whats the current status on that? Are they considered or even possible as a feature? I would love to see “composite key upsert” and “composite lookup refs”.

pesterhazy18:02:42

you could make your own composite key attribute

pesterhazy18:02:31

lookup ref: [:my/key (pr-str [:foo :bar])]

pesterhazy18:02:58

you'd have to make sure you always update the composite key when you update the individual attributes though

lucascs18:02:10

plus the storage requirements for the string can be way higher than each key's

taylor.sando19:02:26

I am trying to set the datomic.txTimeoutMsec property. Can you directly set it before you create the connection using, (System/setProperty "datomic.txTimeoutMsec" "1") I want to set it really low so that it will cause a timeout, but it doesn't seem to be changing the transaction timeout time.

nottmey19:02:19

@pesterhazy yea, currently I will need to funnel all composite key parts through one self-chosen encoded additional key attribute, with tx-fns and so on.

nottmey19:02:52

@lucascs what do you mean?

lucascs19:02:08

nottmey: if your composite keys are two longs, you can fit them in 4 bytes. (pr-str [a b]) however can be a string with 30 bytes, for example

lucascs19:02:20

usually that's not a problem, thou

nottmey19:02:36

ahh I see, yea it is indeed overhead.

favila20:02:14

@taylor.sando I think the datomic.txTimeoutMsec value is captured at static initialization time, so I don't think you can change it other than at the command line and have datomic see the new value.

favila20:02:58

@taylor.sando however, you can achieve the same effect with (deref (d/transact-async conn [,,,]) 1 nil) and check for nill

favila20:02:30

@taylor.sando Or write a helper fn to deref+throw exception for you