Fork me on GitHub
#datomic
<
2019-05-02
>
Drew Verlee01:05:35

I'm trying to setup datomic cloud, i might eventually roll this into a "production" sever, but its doubtful that will happen anytime soon (months if ever). https://docs.datomic.com/cloud/setting-up.html The docs make this comment: > If you are setting up a Datomic Cloud System for production or doing exploratory work for such a purpose then consider creating separate storage and compute stacks. Should i go that route? and follow the instructions here?https://docs.datomic.com/cloud/operation/new-system.html I would guess not, as it probably a bit more complex and i can upgrade to one later right?

souenzzo01:05:14

@drewverlee cloudformation is the central point You can create storage, solo, production and query from it. To create a system, you just need to copy the URL from https://docs.datomic.com/cloud/releases.html and paste on "create from JSON URL" the storage, usually my-system store the data. It will never be deleted the solo, usually my-system-XXXX can be deleted and created (on create, it will ask for the storage name) you can delete a solo and create a prodution, pointing to the same storage

👍 4
Ivar Refsdal12:05:39

I'm using datomic pro 0.9.5786 on-prem and got the following error in my logs (as WARN level) from the datomic.common logger:

o.a.a.a.a.c.ActiveMQNotConnectedException: AMQ119007: Cannot connect to server(s). Tried with all available servers.
	at o.a.a.a.c.c.i.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:799)
	at d.artemis_client$create_session_factory.invokeStatic(artemis_client.clj:114)
	at d.artemis_client$create_session_factory.invoke(artemis_client.clj:104)
	at d.connector$try_hornet_connect.invokeStatic(connector.clj:110)
	at d.connector$try_hornet_connect.invoke(connector.clj:95)
	at d.connector$create_hornet_factory.invokeStatic(connector.clj:142)
	at d.connector$create_hornet_factory.invoke(connector.clj:132)
	at d.connector$create_transactor_hornet_connector.invokeStatic(connector.clj:322)
	at d.connector$create_transactor_hornet_connector.invoke(connector.clj:317)
	at d.connector$create_transactor_hornet_connector.invokeStatic(connector.clj:320)
	at d.connector$create_transactor_hornet_connector.invoke(connector.clj:317)
	at d.p.Connection$fn__10138.invoke(peer.clj:237)
	at d.peer.Connection.create_connection_state(peer.clj:225)
	at d.peer$create_connection$reconnect_fn__10213.invoke(peer.clj:489)
	at c.core$partial$fn__5841.invoke(core.clj:2623)
	at d.common$retry_fn$fn__697.invoke(common.clj:514)
	at d.common$retry_fn.invokeStatic(common.clj:514)
	at d.common$retry_fn.doInvoke(common.clj:497)
	at clojure.lang.RestFn.invoke(RestFn.java:713)
	at d.peer$create_connection$fn__10215.invoke(peer.clj:493)
	at d.r.Reconnector$fn__9445.invoke(reconnector2.clj:57)
	at c.core$binding_conveyor_fn$fn__5756.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at j.u.c.FutureTask.run(FutureTask.java:266)
	at j.u.c.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at j.u.c.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Is there a way to change this message to ERROR level? Is there a way for my app to detect that this has happened? Edit: I got this as a one off error, usually everything works fine.

MegaMatt12:05:18

I’m going to play around with datomic cloud but will only have a couple days a week to do so. Does it work to just stop the ec2 instances and turn them on when i’m learning it? Or do i have to tear down the whole stack each time?

4
MegaMatt13:05:05

if anyone knows, please at me in your response

Joe Lane14:05:36

@matthewdaniel If you go to EC2 Dashboard you can change the minimum number of machines in the autoscaling group to 0, then change the desired amount to 0 and it will shut them down. See the docs for more details https://docs.datomic.com/cloud/operation/planning.html#turning-down

MegaMatt14:05:12

great, thank you very much

Joe Lane14:05:39

np, its a ton of fun to play with 🙂 LMK if you’ve got more questions.

dangercoder16:05:46

thank you for this. I had datomic cloud running last month but I was only using it like 2-3h a day when developing on my own time outside of work 😍.

👍 4
MegaMatt22:05:28

@U0CJ19XAM is there a way to connect to this via the rest? i’m trying to setup a javascript connection planning to use https://github.com/limadelic/datomicjs

Joe Lane22:05:10

Unfortunately I dont believe there is.

Joe Lane22:05:26

Datomic cloud isn’t exposed over the internet

Rafael Nami15:05:09

yep, having the same error for the dev setup on prem than @ivar.refsdal when I try to create a database

Rafael Nami15:05:17

dev setup === local dev setup

Rafael Nami23:05:26

memory works fine

Rafael Nami23:05:35

trying with datomic + dynamodb local too

Rafael Nami23:05:48

ActiveMQNotConnectedException AMQ119007: Cannot connect to server(s). Tried with all available servers. org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory (ServerLocatorImpl.java:799)

Rafael Nami23:05:56

when trying to create a database

Ivar Refsdal07:05:27

Did you read/try the alt-host setting? https://docs.datomic.com/on-prem/storage.html#connecting-to-transactor I got this error as a one-off. My app has been running fine in production for a while now

Rafael Nami21:05:41

Thanks Ivar, will try that one - tried with dev protocol and ddb-local - both failing with the same message and not creating the database

Rafael Nami21:05:03

will try with the peer connecting with the transactor (was connecting using REPL)

mrchance23:05:56

Hey, how can I do a conditional over an aggregate in datomic? I tried something along the lines of [(max ?date) ?last-date] [(before ?last-date ?ref-date)] but it looks like that's always a max over one item in the query, which is kind of expected

mrchance23:05:17

Ah, nice, thank you!