Fork me on GitHub
#datomic
<
2019-03-31
>
shaun-mahood01:03:06

Has anyone got any good resources on general AWS stuff that would be applicable to ions? I’d love to read up a bit more from sources other than the docs that anyone would recommend.

dangercoder16:03:41

I am working on a problem that i've never solved using a database before because I've always had this state locally. Let's say I have a "worker-entity" with a :worker/current-jobs-counter attribute. Whenever I start a job I will pick a worker where current-jobs-counter is below 10, and increment it by 1. Would that include a transaction function in datomic?

favila14:04:01

You can do this with a transaction function: transaction function essentially have a lock on the entire database so there's no possibility of stale reads or conflicts.

favila14:04:01

But you may also be able to do it with speculative writes that retry if a conflict was detected. Maybe you can use the builtin cas (check and swap) transaction function: https://docs.datomic.com/on-prem/transactions.html#dbfn-cas https://docs.datomic.com/cloud/transactions/transaction-functions.html#sec-1-2

dangercoder17:04:06

i guess a transaction function in the cloud becomes a ion

favila18:04:43

sorry I don't know cloud as well

dangercoder19:04:53

No worries, I am very thankful for your replies. Made some good progress conceptually 🙂