Fork me on GitHub
#datomic
<
2017-07-18
>
danielcompton03:07:39

@devth do you have any open source code showing your spec->schema->generators stuff?

devth13:07:50

we're planning to open source it but not yet. i'll see if i can get something out in the next week or two. will post here when we have something out.

danielcompton03:07:44

that sounds really useful

wistb06:07:07

hi, (we are analyzing datomic for our situation) : say, we divide our data among n number of datomics. Our logic needs to break down a unit of change among these datomics. Our understanding is, you have the peer library that application can use to "transact" the data. Is it possible for a code of the following nature ? or is there a different way to do it ?

wistb06:07:16

save () {

wistb06:07:45

try { tx1.save(stuff1); tx2.save(stuff2); } catch (Exception e) { rollback();} }

val_waeselynck11:07:30

I don't believe so, Datomic provides transactions only in the context of one transactor.

val_waeselynck11:07:17

Approaches to mitigating this issue can include 1 - using db.with() on both connections prior to transacting to ensure some invariants speculatively 2 - issuing compensating transactions in case of an error. Both are full of caveats IMO.

schmee07:07:13

@wistb you can do (almost) arbitrary Clojure code in a transaction: http://docs.datomic.com/database-functions.html#transaction-functions

val_waeselynck11:07:27

I don't think this solves @wistb's issue, as transaction functions can't be used to provide coordination across several Datomic deployments

pbostrom19:07:49

are transaction fns not supported when transacting a schema via the client API?

pbostrom19:07:32

I'm running into the same problem described here: https://groups.google.com/forum/#!topic/datomic/YKsnB_z1YHs

schmee20:07:56

I also had trouble a couple of days ago trying to use clojure.core fns with the client api

beders20:07:52

you need to make the code available to the transactor as far as I understand, since with the client library the query are not running locally