Fork me on GitHub
#datomic
<
2021-02-03
>
ghadi01:02:34

@stuartrexking I would make schema transactions part of your deployment process, not part of the app bootup

ghadi01:02:29

Especially when there are several nodes waking up to do the same work concurrently

ghadi01:02:49

You could certainly use conformity as a library or script

ghadi01:02:20

I just mean: do it in a separate moment from app bootup.

stuartrexking01:02:49

@ghadi Is that necessary if planning for accretion and adhering to the schema growth principle? https://docs.datomic.com/cloud/best.html#plan-for-accretion

stuartrexking01:02:18

I just don’t see the benefit of doing it out of band of an app startup.

stuartrexking01:02:32

So what you are suggesting is, specific to ion app: 1. Push and deploy 2. Trigger a schema transaction (always or only when the schema has changed?)

stuartrexking01:02:16

Really what I want to know is why “I just mean: do it in a separate moment from app bootup.”

ghadi01:02:27

(The accretion principle still applies) If you have N nodes booting up, you have N racey processes trying to do the same work.

ghadi01:02:13

What I’ve seen work well is: Run tests, get a green check Transact new schema to DB Then deploy The app can presume that its schema exists in the DB - or exit if it doesn’t

ghadi01:02:09

The Ion sample uses an endpoint to trigger schema installation, but in a real app you’d likely have code that expects the schema to be there, along with the schema installation code, so it’s a catch 22

3
stuartrexking02:02:13

Thanks seems like a good approach. I’ll do that.

kschltz11:02:11

Well, I transact the schema on bootup, as there are only 4-6 nodes of that particular service, no issues so far

pinkfrog12:02:21

• Wanna play with Datomic Pro Starter Edition. Does the “Running more than 3 processes (2 peers + transactor)” not allowed still apply?