clojure 2026-01-14

This message was deleted.

the https://jepsen.io/analyses/datomic-pro-1.0.7075 is particularly of note because it helped clarify a property of Datomic that is the exact opposite of what you're proposing here: Datomic does not have any intra-transaction semantics. No temporal or logical ordering is implied by the ordering of facts to transact to a Datomic DB - it's all-or-nothing. https://docs.datomic.com/transactions/model.html#integrity-and-composition describe it like this: > The indivisibility of transactions is a powerful guarantee, directly analogous to real-world contracts. When parties agree to a contract, they agree to all provisions of the contract at once, and would not in general be willing to agree to only an arbitrary sub- or superset of the provisions. (The fact that I am willing to sell you my house does not mean that I am willing to give you my house.) Like Datomic transactions, real-world contract provisions must be written in some order but that order is incidental: Contracts take effect all at once. It may be an instructive point of contrast for what you're trying to do.

Are you asking how to implement this feature or what an API for this kind of feature might look like?

There are a few open source dbs written in clojure that may provide inspiration: • https://github.com/replikativ/datahikehttps://github.com/quoll/asamihttps://github.com/juji-io/datalevinhttps://github.com/tonsky/datascripthttps://docs.xtdb.com/ For an API, you can look at https://github.com/seancorfield/next-jdbc which is a popular library for working with SQL databases.

Thanks for the sources I’m mainly looking for theoretical ideas on how to model commit and rollback handling in a way that aligns Clojure.

That seems like a pretty specific, deep topic. I would start with checking out the various open source databases. Some of them are very well documented (including internals). You can also check out the publications from the author of datalevin, https://huahaiy.github.io/publications/. You may have to synthesize ideas about clojure with your area of interest. There are also lots of resources that cover datomic, which is an idiomatic clojure database.

and if you're interested in databases, you should definitely check out the jepsen posts, https://aphyr.com/tags/jepsen

👍 1
➕ 1