Fork me on GitHub
#datomic
<
2021-03-01
>
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….

jjttjj13:03:56

I haven't looked at it extensively, but https://github.com/clojureverse/clojurians-log-app is a real production app using datomic

👍 3
Pragyan Tripathi14:03:11

Thanks a ton for these projects.. it helps 🙂

mikejcusack22:03:00

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?

favila23:03:27

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

mikejcusack00:03:36

The latter option isn't using history.

em02:03:29

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.

mikejcusack02:03:28

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.