Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I've been hearing about Datomic on and off over the years, and I never saw a clear answer to the simple question: what is it? What does it do?

I'm guessing most people, like me, first heard about both Clojure and Datomic from one of Hickey's famous talks about software development. Coming from one of those, I guess it's a bit easier to understand what the various concepts and words mean from Datomic's website for example.

I guess the easiest way to put it: Datomic is a append-only (deletions via "retraction" records) database that lets you query through time (also called "Bitemporal modeling" with fancier words).

The features/benefits page I think is pretty clear (https://www.datomic.com/benefits.html) but again, might just be my familiarity speaking.



> that lets you query through time (also called "Bitemporal modeling" with fancier words)

Datomic is actually only 'uni-temporal', it provides a database-wide, immutable "system time" (aka "transaction time") versioning + very effective as-of querying. This naturally falls out of the "Epochal Time Model" (see Deconstructing the Database, 2012). However there is no particular built-in support for any further mutable time dimension, see: https://vvvvalvalval.github.io/posts/2017-07-08-Datomic-this...

System-time is still very powerful though. The way I think of the difference is: system-time versioning is mainly useful for debugging and auditing (and of course for the horizontal read scaling), whereas valid-time versioning is useful for timestamp-based reporting (or other forms of in-application time-travel and modelling 'truth' in business data) where the system-time timestamps are not the timestamps end users are directly interested in, see: https://tidyfirst.substack.com/p/eventual-business-consisten...


I am aware of the basics but it's hard to find details on "why not Postgres" or other standard solution for basically event sourcing.


Event sourcing is usually something you'd have to implement yourself, it's "just" a pattern.

While Datomic et al gives you a bunch of useful features out-of-the-box.

Yes, you can build a query system that allows you to see data at specific points of time with event sourcing, but you likely have to implement that yourself. Compared to temporal databases where it's just (usually) a parameter you pass together with your query.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: