Fork me on GitHub
#datomic
<
2021-12-18
>
Benjamin08:12:28

When deploying an ion which of my namespaces get loaded? Guess just the ones that contain ions?

danieroux09:12:53

Yep. I have a boot namespace that all my ions include, to do some setup. Just be aware of the on-use restriction - only get a DB on use, not during load.

Ivan Fedorov13:12:50

@U9E8C7QRJ is there any possibility to trigger an event when DB becomes available? I would use one to ensure migrations set is rolled

donavan15:01:42

We’re hitting the same issues discussed here. We have an Integrant system that starts our app and the Datomic client is used in a number of the Integrant init keys. 2 issues that arise from this are; the first request to the system has to load the whole app and secondly any errors in loading the system are only surfaced when someone hits the app. We’ve tried loading the app via a lambda but that means the deployment completes before the app starts.

donavan15:01:09

Apologies, upon reading that post again my point is rather implicit… We’d also find something like a callback or event that fired when the system was ready for connections really useful

stuartrexking22:01:12

We tried this for a while and eventually moved away from Ions. If your app needs any kind of lifecycle management then you are better just deploying an uberjar IMO. See here https://forum.datomic.com/t/datomic-ion-lifecycle-events-or-hooks/1893

donavan15:01:42

We’re hitting the same issues discussed here. We have an Integrant system that starts our app and the Datomic client is used in a number of the Integrant init keys. 2 issues that arise from this are; the first request to the system has to load the whole app and secondly any errors in loading the system are only surfaced when someone hits the app. We’ve tried loading the app via a lambda but that means the deployment completes before the app starts.

donavan15:01:09

Apologies, upon reading that post again my point is rather implicit… We’d also find something like a callback or event that fired when the system was ready for connections really useful