Fork me on GitHub
#datomic
<
2017-08-25
>
stijn09:08:00

@mgrbyte thanks for the suggestion

dpsutton19:08:29

i'm trying to run the day-of-datomic tutorials. I'm following the README to lein run -m datomic.samples.tutorials which is blowing up with a connection refused error. Has anyone run across this before?

hmaurer19:08:49

@dpsutton can you link me the code?

hmaurer19:08:54

(it’s on a git repo I assume?)

dpsutton19:08:29

yeah it's stu halloway's day of datomic. and just cranking it up is not working for me

dpsutton19:08:22

there seem to be some in-memory examples which work fine, but some examples seem to be reaching out to a running instance which hasn't been started as far as i can tell

dpsutton19:08:33

yeah. i don't understand how this is supposed to work, honestly

dpsutton19:08:42

the readme seems pretty silent about it

hmaurer20:08:20

if it’s only a couple of tutorial steps I guess you can just skip them for now. Then later you have two options:

hmaurer20:08:51

either set up a local datomic free transactor. As far as I can see there are steps in the README of the mbrainz repo to do it

hmaurer20:08:12

or adapt the tutorial to use an in-memory database (probably harder if you are not familiar with datomic)

hmaurer20:08:04

actually I get why they’re using a non-memory db…

hmaurer20:08:15

As far as I know you can’t restore a DB from a backup if you are using an in-memory DB

hmaurer20:08:22

and the mbrainz-sample data is provided as a db backup

hmaurer20:08:31

(which you can then restore to populate your database)

hmaurer20:08:00

Follow the README from mbrainz-sample, it should guide you through the necessary steps

hkjels20:08:31

I’m starting out a new project and the only thing I know for sure is that I’m going to use Datomic, but I haven’t really decided on a front-end yet. What are my best options these days?

hmaurer20:08:57

@hkjels are you looking to use clojurescript or not?

hkjels20:08:27

ClojureScript for sure

dpsutton20:08:40

@hmaurer thanks a lot. i'll get on that in a second

hmaurer20:08:11

Let me know how it goes. I’ll try it locally if you run into trouble

hmaurer20:08:54

In that case I can’t advise you much as I am new to Clojure. It depends how experimental you want to go. From what I gather something like Om next is a safe bet. There are also people attempting to do things with Datascript

hmaurer20:08:21

http://precursorapp.com also works by syncing Datascript and Datomic

hmaurer20:08:49

It seems non-trivial if your project has non-trivial requirements though (lots of data, authorization concerns, etc)

hmaurer20:08:47

e.g. in the talk linked above the speaker worked on a project where every user had full access and the data-set was fairly small, so he could afford to replicate it “dumbly” to every user’s browser over websocket

hmaurer20:08:37

You might also want to watch this talk: https://www.youtube.com/watch?v=qijWBPYkRAQ

hmaurer20:08:41

(they use Om Next)

hmaurer20:08:23

You might get more useful advice on frontend options if you ask on #clojurescript 🙂

hkjels20:08:58

This was plenty 😀 I’ll have a look at these videos

hmaurer20:08:44

As a last bit of info: I am working on a project right now with Datomic on the backend. I have 0 experience with Clojurescript and I am new to Datomic so I didn’t want to go full experimental with Datascript/Om Next. I ended up writing some code to auto-generate a GraphQL schema from my Datomic schema + an extra map of information to handle the basic CRUD stuff.

hmaurer20:08:50

Then I added some custom behaviour on top of that

hmaurer20:08:49

I am using Javascript (ES6) + Relay on the frontend, hitting a GraphQL API mostly auto-generated

hmaurer20:08:06

(my needs are very simple though; basic CRUD)

hkjels20:08:28

I haven’t decided if I’m going with safe just yet. If so, that sounds like a really good option, to generate GraphQL I mean

hkjels20:08:41

and safe for me would be re-frame

hmaurer20:08:22

@hkjels the first talk I linked mentions re-frame. They are using https://github.com/mpdairy/posh, which is a library on top of re-frame and Datascript (from what I gather)

hkjels20:08:28

This was great! I have the rest of my evening set 😉

hmaurer20:08:55

Enjoy 🙂