Fork me on GitHub
#datomic
<
2017-01-08
>
eoliphant01:01:35

anyone running datomic on AWS? I’m trying to set it up, but the docs, and the video they reference (which is pretty old) don’t seem to line up. The video has you run an ‘ensure-transactor’ subcommand which isn’t enumerated in the text just wondering what’s actually authoritative

eoliphant01:01:23

nvm, RTFM lol

notanon04:01:00

keep a close eye on the Cloudformation stack

notanon04:01:34

i tried to create one on aws and the ec2 instance just went from starting - running - stopping - terminated over and over again for an hour

notanon04:01:47

before i deleted the stack and gave up

notanon04:01:55

cost $3 🙂

chris_johnson17:01:19

I’m actually running Datomic transactors in AWS in production, using the stock CF template/stack right now

chris_johnson17:01:35

the instance will log to an S3 bucket - when you get that starting - running - stopping - terminated cycle over and over you can go look in the logs bucket to see what’s up. In my experience it’s usually a problem with not being able to “see” the DynamoDB storage (either the URI is wrong or the roles have been misconfigured somehow)

notanon18:01:20

yeah it wasnt creating the s3 bucket, that's a big reason why i gave up. i suspect it was due to a security privilege (all though i gave it full access to s3:* or w/e the security format is), if i try again i'm just going to give the user full access to everything (scary).

notanon18:01:19

i really wish there was a DBaaS option available on a cloud

notanon18:01:17

seems like a good small business idea 🙂

PB19:01:13

Hey y’all. I have written a simple datomic library to make your lives easier. If someone could give me feed back regarding anything. I’d really appreciate it: https://github.com/petergarbers/molecule

PB19:01:03

It’s a simple datomic wrapper that removes a lot of the cruft around writing queries. I’ve found it to be extremely useful

eoliphant19:01:31

yeah I had the starting - running - stopping - terminated problem as well

pesterhazy20:01:02

@petr, your first example looks like you're re-inventing lookup refs

PB20:01:38

@pesterhazy Hmm interesting. That’s not what I was trying to show. That could be any value. I just chose to use a ref there. Do you think a different example would be better?

pesterhazy20:01:26

the other thing is that hiding the datomic connection (as an implicit argument) is frowned upon by some (unless you only intend the library as a convenience for the repl)

eoliphant20:01:55

@chris_johnson i’d not configured the bucket name, in the transactor config, so I redid everything and recreated the stack. So the bucket has been created, but whatever’s failing is doing so before it manages to dump any logs

PB20:01:34

@pesterhazy I’m assuming you’re referring to the database value? It’s actually an optional argument. I should add that to the documentation. In my usage of datomic I have usually wanted the latest value of the database

pesterhazy20:01:41

still it's better to explicitly call d/db once (at the beginning of a request handler, say) and then use the same value for the same piece of work

pesterhazy20:01:59

that way you get a consistent "view of the world"

PB20:01:59

@pesterhazy I agree with that. A lot of the time I have found would be a rest endpoint where I’m retrieving a value and just returning that object in JSON format. Using this library there is nothing stopping you from explicitly calling d/db at the beginning of the request and passing it as such (m/entities <db from wherever> {:something/else “moo”})

PB20:01:17

Thanks for that. I’ll add it to the documentation

pesterhazy20:01:45

the point is, that should be the default IMO, unless you're exploring from the repl

PB20:01:09

Do you mean in the documentation?

PB20:01:30

Because there is nothing stopping anybody from doing that as their way of doing things in their own app

PB20:01:05

You have the option to do either

notanon21:01:34

@eoliphant thats what happened to me. and why i gave up. p.s. the docs say that if you leave the bucket name empty it will create one for you (it never did for me, i then tried manually and it still didnt log)

eoliphant21:01:02

yeah this is annoying lol, it’s probably something simple, was trying to avoid having to stand one up by hand

notanon21:01:23

honestly think that would be easier

notanon21:01:31

i dont know anything about aws or cloudformation

notanon21:01:02

but it's not hard to start an empty ec2 instance and just ssh into the box and configure it all myself

eoliphant21:01:27

yeah, gonna give it a whirl, we actually do a lot of aws stuff. CF is great when everything works lol. We actually use another tool called Terraform as well for setting stuff up on AWS.

eoliphant21:01:36

yeah I think that’s what I’m going to do

eoliphant21:01:43

or just roll my own AWS image

eoliphant21:01:17

i left a note in the google group, but will just give it a manual whirl in the meantime

notanon21:01:29

best of luck