datomic 2026-09-25

Is there a good article somewhere about how Datomic relates to something like event sourcing? I would like to deepen my understanding of the various types of immutable records.

👀 1

This https://www.augustl.com/blog/2018/datomic_look_at_all_the_things_i_am_not_doing/ touches on it a bit! But I think one of the most definitive presentations is probably in https://www.youtube.com/watch?v=Cym4TZwTCNU, which I strongly recommend if you haven't watched it already.

On a very related note, does anybody have tips on using Datomic as a event bus? I realize this is not a great use of Datomic, but in some limited situations I've hacked up something that works. It would be useful to understand how others might be solving the same problem.

This is very old but (essentially Kafka around Datomic): https://www.youtube.com/watch?v=qDNPQo9UmJA

I thought a lot about this in the recent years. In a Datomic transaction you can assert different facts regarding arbitrary entities. It can be difficult to reverse engineer what this Datomic transaction meant for your business. Event sourcing on the other hand forces you to assign a name to the change/event. Datomic automatically builds the indexes you need to query the facts using datalog. With event sourcing it is your job to build the read model. The read model is derived state meaning you can throw it away and rebuild it from the events (the essential state). Thereby you can reinterpret how you want to represent an event in your read model. There could be different forms of read models like a reduce, a SQL db, full text search or even a Datomic database. In Datomic you kind of mix the essential and derived state, but you get a more cohesive data model.

👍 1
💯 1

Oh, this is very important: https://docs.datomic.com/resources/videos.html#reified-transactions , It introduces a practical way to implement the saga pattern (which is often sort of the problem that you want to solve using event sourcing)

💯 1