Fork me on GitHub
#datomic
<
2019-04-10
>
henrik12:04:00

Like benoit said, store it in somewhere like S3, DynamoDB or another KV-store. You can serialize the EDN with Transit (you can use the msgpack version of Transit for this). If you generate a unique key (UUIDs are fine for this) every time you update the content, you effectively can preserve the immutability of Datomic, as earlier versions of the same entity will have UUID keys pointing to a different value in the KV store.

👍 4
rplevy19:04:46

I'm trying to figure out what I'm doing wrong setting up datomic free locally. I've installed and started H2, I'm running a transactor and a console, I've uncommented h2-port=4335 in transactor.properties, but yet:

user=> (d/create-database "datomic:)
...
ActiveMQNotConnectedException AMQ119007: Cannot connect to server(s). Tried with all available servers.  org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory (ServerLocatorImpl.java:799)

benoit19:04:46

@rplevy I believe Datomic free only works with in-memory and disk storage.

rplevy19:04:17

Well I'm trying to do a fairly straightforward setup and just running it at all, and that's what I get

rplevy19:04:45

I thought maybe I had to set up H2 for it to work but I get the same result either way

benoit20:04:11

I had issues recently with Datomic Free and recent Java versions. Maybe you will have more luck with Java 1.8 or Java 1.9.

rplevy20:04:45

Looks like I'm running openjdk 12

rplevy20:04:56

Maybe I need to downgrade...

rplevy20:04:56

Interesting, datomic doesn't work with the newer JDKs, downgraded to 1.9

rplevy20:04:59

At first I thought maybe it was because I was on the latest datomic free version but earlier versions failed in the same way, until I downgraded java