Fork me on GitHub
#datomic
<
2016-08-19
>
stuarthalloway00:08:54

@zentrope if you throw an exception from a tx function then nothing is added to the durable store, similar to rollback

zentrope01:08:44

@stuarthalloway Thanks. I personally like that approach.

robert-stuttaford03:08:01

@jdkealy: tests on circleci are totally possible IF your tests use a memory database - datomic:mem://

bostonaholic03:08:18

@robert-stuttaford: CI aside, that’s a pattern I’d suggest anyway

pesterhazy08:08:39

Storing information in reified transactions can be pretty inflexible sometimes

pesterhazy08:08:53

I wrote an exporter that exports a (subset of) a prod db, so that developers can use it as a dev db on their laptops

pesterhazy08:08:40

The exporter exports the datoms but transacts them in a different granularity (in chunks of 1000)

pesterhazy08:08:31

But this also means that the dev dump lacks the tx metadata

pesterhazy08:08:10

We're using conformity for migrations, which uses tx metadata to mark transactions as "already performed".

pesterhazy08:08:31

Unfortunately, this means that conformity considers all txs as "not yet performed", which leads to issue with schema alterations.

pesterhazy08:08:55

And as transactions are immutable, it's not easy to fix after the fact.

robert-stuttaford09:08:04

yep. you basically have to not-use-conformity for schema in your dump db

pesterhazy09:08:22

I mean it works for the most part, until you start renaming attributes

pesterhazy09:08:40

(I don't know why we started doing that, not a good idea unless you're forced to)

onetom09:08:39

is there an idiomatic way to get enums in query results as keywords (their :db/ident)?

onetom09:08:16

if i do pull [* {:user/status [:db/ident]}] i get a nested map which is an unnecessary complication

robert-stuttaford09:08:07

@onetom, pull does that by design, because you may have other things on that entity that you care to pull

robert-stuttaford09:08:25

d/entity returns the keyword; d/pull returns what you've printed

onetom09:08:21

awesome, thanks!

stuarthalloway11:08:31

@pesterhazy I think the inflexibility is in the exporter, not in reified transactions. The exporter ignores a semantic of the db, so you cannot then expect that semantic to be preserved

stuarthalloway11:08:56

and conformity is hardly the only thing that uses reified transactions

lvh13:08:55

@robert-stuttaford: I was listening to your podcast episode on Datomic on a plane ride; it was interesting to hear about your experiences even though I’m already somewhat familiar with datalog/datomic/datascript -- thank you 🙂

robert-stuttaford13:08:14

absolutely my pleasure 🙂

robert-stuttaford13:08:30

was great fun to chat to the guys. it got Deep Nerd in there

Chris O’Donnell16:08:27

Is there anything I can do to reduce transactor memory usage? I'm using datomic for a personal project; the database is only a couple hundred MB, but the transactor is eating 1.5G of memory.

potetm16:08:23

Is there any way to log dynamodb requests?

potetm16:08:54

Specifically a slow log? (e.g. log request id every time a request takes longer than Xms)

jdkealy17:08:11

@robert-stuttaford but how do you boot the transactor? do you need to create a docker container ?

jaret18:08:34

@codonnell: The transactor by default launches with 1 gig of memory. You can modify the properties in the transactor properties file and try to push this lower, but 1 gig is recommended for use on laptops/development. The transactor also accepts java arguments when executed so you can pass in -Xmx1g or whatever your desired memory usage is.

robert-stuttaford18:08:34

@jdkealy we use the AWS AMI that Datomic provides, after sprinkling some http://datadoghq.com agent code on it

cmcfarlen18:08:39

Is this a reasonable way to get the last few transactions or will it perform poorly for large transaction logs? (take-last 5 (d/tx-range (d/log connection) nil nil))

arohner19:08:13

potetm I’m not sure I’ve ever seen a slow request in dynamo. i.e. I don’t think it’s possible to write a slow query, aside from scan