Fork me on GitHub
#datomic
<
2019-04-16
>
marcol11:04:19

I getting a weird error on AWS trying to get the DB of a datomic cloud instance:

{:clojure.error/phase :compile-syntax-check, :clojure.error/line 1, :clojure.error/column 1, :clojure.error/source "datomic/client/impl/shared.clj"}

marcol11:04:49

By isolating the problem I now receive:

Unable to resolve entry point, make sure you have the correct version of com.datomic/client on your classpath
when trying to get the client

ghadi13:04:11

what is your dependency in your deps.edn or project.clj? @marcol

marcol14:04:05

com.datomic/client-cloud "0.8.71"

Laurence Chen14:04:37

Hi, I encounter a Datomic design decision -- "How to design at the situation that we need generalized compare-and-swap semantic in Datomic?" I have sorted out my question in stackoverflow. https://stackoverflow.com/questions/55706444/how-to-design-at-the-situation-that-we-need-generalized-compare-and-swap-semanti I really appreciate anyone can give me some hints. Thx.

benoit14:04:28

I would consider the UX of the system. Does it make sense for admins to work on the same request at the same time? If not, I would implement a lock mechanism with CAS so the admins can get immediate feedback whether they should work on an item or someone else just started to work on it. It has the drawback of requiring one more click for the admin before starting working on a request but the advantage of not spending time on a request is someone is already working on it.

benoit14:04:50

If the extra click is a problem you can always automatically lock when delivering the request to an admin and expire the lock if there is no activity after a certain period of time.

benoit14:04:42

But if you don't mind wasting admin's time, I would just do the modifications of the request in a transaction function to ensure atomicity.

Laurence Chen15:04:14

Hmmm, interesting answer. I deliberately create this story, but I never think that this problem can be solved from UX. Thank you.

sooheon21:04:38

Hi guys, if I’m attempting to model the equivalent of a multi-column primary key for uniqueness in Datomic (say I have a unique entity or “row” for each Player + Season + Team and a bunch of stats attributes), should I create a derived ID column that is (str player team season) and put db.unique/identity on that, or is there a way to specify that those three columns together represent a unique identity that should be upserted on?

benoit22:04:14

When you want to ensure any kind of constraints across attributes, you should write a transaction function.

sooheon22:04:34

Thanks, this makes sense!