Fork me on GitHub
Pragyan Tripathi12:03:13

is there any really good sample project to learn datomic. I am trying to spin a simple server with crud operations to datomic.

Pragyan Tripathi12:03:58

Yes… but not completely.. I am familiar with basic datomic concepts and datalog queries. I was looking for some sample project to understand how does everything come together to build an application….


I haven't looked at it extensively, but is a real production app using datomic

👍 3
Pragyan Tripathi14:03:11

Thanks a ton for these projects.. it helps 🙂


In the case of a personal finance management system in Datomic, does it make more sense to have the current value of an account determined dynamically by reducing the transactions or to create a transaction function that on every transaction it walks through each account involved in the transaction and update an amount attribute for the respective account?


Neither one? You shouldn’t have to use history to determine the account balance


The latter option isn't using history.


In the context of a more event-sourced model the former can make a lot of sense with multiple streams, out-of-sync arrivals, various sources of truth etc. but in this case I think the tx-function approach is totally fine. Especially considering that the scale seems small, and Datomic having single global write transactor. Then again if the scale is small enough reducing on every lookup might not be that expensive either.


That's about what I was thinking. I don't think the scale would be large enough for reducing to be a problem. Especially since the query would filter down to the relevant transactions first.